Author: jelmer Date: 2007-12-13 11:41:47 +0000 (Thu, 13 Dec 2007) New Revision: 26426
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26426 Log: Remove uses of global_loadparm. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/ldb/tools/ad2oLschema.c branches/SAMBA_4_0/source/libcli/resolve/nbtlist.c branches/SAMBA_4_0/source/nbt_server/wins/winswack.c branches/SAMBA_4_0/source/torture/nbt/winsbench.c branches/SAMBA_4_0/source/torture/rpc/spoolss_notify.c branches/SAMBA_4_0/source/torture/rpc/spoolss_win.c Changeset: Property changes on: branches/SAMBA_4_0 ___________________________________________________________________ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/lib/ldb/tools/ad2oLschema.c =================================================================== --- branches/SAMBA_4_0/source/lib/ldb/tools/ad2oLschema.c 2007-12-13 10:28:18 UTC (rev 26425) +++ branches/SAMBA_4_0/source/lib/ldb/tools/ad2oLschema.c 2007-12-13 11:41:47 UTC (rev 26426) @@ -37,6 +37,7 @@ #include "tools/cmdline.h" #include "tools/convert.h" #include "param/param.h" +#include "lib/cmdline/popt_common.h" struct schema_conv { int count; @@ -677,7 +678,7 @@ } } - target_str = lp_parm_string(global_loadparm, NULL, "convert", "target"); + target_str = lp_parm_string(cmdline_lp_ctx, NULL, "convert", "target"); if (!target_str || strcasecmp(target_str, "openldap") == 0) { target = TARGET_OPENLDAP; Modified: branches/SAMBA_4_0/source/libcli/resolve/nbtlist.c =================================================================== --- branches/SAMBA_4_0/source/libcli/resolve/nbtlist.c 2007-12-13 10:28:18 UTC (rev 26425) +++ branches/SAMBA_4_0/source/libcli/resolve/nbtlist.c 2007-12-13 11:41:47 UTC (rev 26426) @@ -38,6 +38,7 @@ struct nbt_name_request **queries; struct nbt_name_query *io_queries; const char *reply_addr; + struct interface *ifaces; }; /* @@ -49,7 +50,6 @@ struct composite_context); struct nbtlist_state *state = talloc_get_type(c->private_data, struct nbtlist_state); struct nbt_name_query *q; - struct interface *ifaces; int i; for (i=0;i<state->num_queries;i++) { @@ -76,16 +76,14 @@ } /* favor a local address if possible */ - load_interfaces(NULL, lp_interfaces(global_loadparm), &ifaces); state->reply_addr = NULL; for (i=0;i<q->out.num_addrs;i++) { - if (iface_is_local(ifaces, q->out.reply_addrs[i])) { + if (iface_is_local(state->ifaces, q->out.reply_addrs[i])) { state->reply_addr = talloc_steal(state, q->out.reply_addrs[i]); break; } } - talloc_free(ifaces); if (state->reply_addr == NULL) { state->reply_addr = talloc_steal(state, @@ -129,6 +127,8 @@ if (composite_nomem(state->name.scope, c)) return c; } + load_interfaces(state, lp_interfaces(global_loadparm), &state->ifaces); + /* * we can't push long names on the wire, * so bail out here to give a useful error message @@ -200,7 +200,8 @@ bool broadcast, bool wins_lookup, const char **reply_addr) { - struct composite_context *c = resolve_name_nbtlist_send(mem_ctx, NULL, name, address_list, + struct composite_context *c = resolve_name_nbtlist_send(mem_ctx, NULL, + name, address_list, broadcast, wins_lookup); return resolve_name_nbtlist_recv(c, mem_ctx, reply_addr); } Modified: branches/SAMBA_4_0/source/nbt_server/wins/winswack.c =================================================================== --- branches/SAMBA_4_0/source/nbt_server/wins/winswack.c 2007-12-13 10:28:18 UTC (rev 26425) +++ branches/SAMBA_4_0/source/nbt_server/wins/winswack.c 2007-12-13 11:41:47 UTC (rev 26426) @@ -223,7 +223,7 @@ * with 2 retries */ state->release.in.name = *state->io->in.name; - state->release.in.dest_port = lp_nbt_port(global_loadparm); + state->release.in.dest_port = lp_nbt_port(state->io->in.nbtd_server->task->lp_ctx); state->release.in.dest_addr = state->io->in.addresses[state->current_address]; state->release.in.address = state->release.in.dest_addr; state->release.in.broadcast = false; Modified: branches/SAMBA_4_0/source/torture/nbt/winsbench.c =================================================================== --- branches/SAMBA_4_0/source/torture/nbt/winsbench.c 2007-12-13 10:28:18 UTC (rev 26425) +++ branches/SAMBA_4_0/source/torture/nbt/winsbench.c 2007-12-13 11:41:47 UTC (rev 26426) @@ -139,7 +139,7 @@ istate->state = state; io.in.name = generate_name(tmp_ctx, idx); - io.in.dest_port = lp_nbt_port(global_loadparm); + io.in.dest_port = state->wins_port; io.in.dest_addr = state->wins_server; io.in.address = state->my_ip; io.in.nb_flags = NBT_NODE_H; Modified: branches/SAMBA_4_0/source/torture/rpc/spoolss_notify.c =================================================================== --- branches/SAMBA_4_0/source/torture/rpc/spoolss_notify.c 2007-12-13 10:28:18 UTC (rev 26425) +++ branches/SAMBA_4_0/source/torture/rpc/spoolss_notify.c 2007-12-13 11:41:47 UTC (rev 26426) @@ -195,6 +195,8 @@ const char *address; struct interface *ifaces; + ntvfs_init(tctx->lp_ctx); + ZERO_STRUCT(q); q.in.printername = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p)); @@ -291,7 +293,6 @@ struct torture_rpc_tcase *tcase = torture_suite_add_rpc_iface_tcase(suite, "notify", &ndr_table_spoolss); - ntvfs_init(global_loadparm); torture_rpc_tcase_add_test(tcase, "testRFFPCNEx", test_RFFPCNEx); return suite; Modified: branches/SAMBA_4_0/source/torture/rpc/spoolss_win.c =================================================================== --- branches/SAMBA_4_0/source/torture/rpc/spoolss_win.c 2007-12-13 10:28:18 UTC (rev 26425) +++ branches/SAMBA_4_0/source/torture/rpc/spoolss_win.c 2007-12-13 11:41:47 UTC (rev 26426) @@ -420,6 +420,8 @@ char *server_name; char *key_pointer; + ntvfs_init(tctx->lp_ctx); + ctx = talloc_zero(tctx, struct test_spoolss_win_context); tmp_ctx = talloc_zero(tctx, struct test_spoolss_win_context); @@ -570,7 +572,6 @@ struct torture_rpc_tcase *tcase = torture_suite_add_rpc_iface_tcase(suite, "win", &ndr_table_spoolss); - ntvfs_init(global_loadparm); torture_rpc_tcase_add_test(tcase, "testWinXP", test_WinXP); return suite;
