From e9017ba418202b4b191c5a9ad4a96857558ce606 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 14 Apr 2008 17:22:58 +0200 Subject: Use _OBJ_FILES variables in a couple more places. (This used to be commit 92856d5054106894b65cd1a1b5119c0facfc4cff) --- source4/nbt_server/config.mk | 45 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 25 deletions(-) (limited to 'source4/nbt_server') diff --git a/source4/nbt_server/config.mk b/source4/nbt_server/config.mk index b510a6e2d6..cb2b47d15e 100644 --- a/source4/nbt_server/config.mk +++ b/source4/nbt_server/config.mk @@ -3,76 +3,71 @@ ####################### # Start SUBSYSTEM WINSDB [SUBSYSTEM::WINSDB] -OBJ_FILES = \ - wins/winsdb.o \ - wins/wins_hook.o PRIVATE_PROTO_HEADER = wins/winsdb_proto.h PUBLIC_DEPENDENCIES = \ LIBLDB # End SUBSYSTEM WINSDB ####################### +WINSDB_OBJ_FILES = $(addprefix nbt_server/wins/, winsdb.o wins_hook.o) + ####################### # Start MODULE ldb_wins_ldb [MODULE::ldb_wins_ldb] SUBSYSTEM = LIBLDB OUTPUT_TYPE = SHARED_LIBRARY -INIT_FUNCTION = &ldb_wins_ldb_module_ops -OBJ_FILES = \ - wins/wins_ldb.o +INIT_FUNCTION = LDB_MODULE(wins_ldb) PRIVATE_DEPENDENCIES = \ LIBNETIF LIBSAMBA-HOSTCONFIG LIBSAMBA-UTIL # End MODULE ldb_wins_ldb ####################### +ldb_wins_ldb_OBJ_FILES = nbt_server/wins/wins_ldb.o + ####################### # Start SUBSYSTEM NBTD_WINS [SUBSYSTEM::NBTD_WINS] -OBJ_FILES = \ - wins/winsserver.o \ - wins/winsclient.o \ - wins/winswack.o \ - wins/wins_dns_proxy.o PRIVATE_PROTO_HEADER = wins/winsserver_proto.h PRIVATE_DEPENDENCIES = \ LIBCLI_NBT WINSDB # End SUBSYSTEM NBTD_WINS ####################### +NBTD_WINS_OBJ_FILES = $(addprefix nbt_server/wins/, winsserver.o winsclient.o winswack.o wins_dns_proxy.o) + ####################### # Start SUBSYSTEM NBTD_DGRAM [SUBSYSTEM::NBTD_DGRAM] PRIVATE_PROTO_HEADER = dgram/proto.h -OBJ_FILES = \ - dgram/request.o \ - dgram/netlogon.o \ - dgram/ntlogon.o \ - dgram/browse.o PRIVATE_DEPENDENCIES = \ LIBCLI_DGRAM # End SUBSYSTEM NBTD_DGRAM ####################### +NBTD_DGRAM_OBJ_FILES = $(addprefix nbt_server/dgram/, request.o netlogon.o ntlogon.o browse.o) + ####################### # Start SUBSYSTEM NBTD [SUBSYSTEM::NBT_SERVER] -OBJ_FILES = \ +PRIVATE_PROTO_HEADER = nbt_server_proto.h +PRIVATE_DEPENDENCIES = \ + LIBCLI_NBT NBTD_WINS NBTD_DGRAM +# End SUBSYSTEM NBTD +####################### + +NBT_SERVER_OBJ_FILES = $(addprefix nbt_server/, \ interfaces.o \ register.o \ query.o \ nodestatus.o \ defense.o \ packet.o \ - irpc.o -PRIVATE_PROTO_HEADER = nbt_server_proto.h -PRIVATE_DEPENDENCIES = \ - LIBCLI_NBT NBTD_WINS NBTD_DGRAM -# End SUBSYSTEM NBTD -####################### + irpc.o) [MODULE::service_nbtd] INIT_FUNCTION = server_service_nbtd_init SUBSYSTEM = service -OBJ_FILES = \ - nbt_server.o PRIVATE_DEPENDENCIES = NBT_SERVER process_model + +service_nbtd_OBJ_FILES = \ + nbt_server/nbt_server.o -- cgit From 21fc7673780aa1d7c0caab7b17ff9171238913ba Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 17 Apr 2008 12:23:44 +0200 Subject: Specify event_context to ldb_wrap_connect explicitly. (This used to be commit b4e1ae07a284c044704322446c94351c2decff91) --- source4/nbt_server/dgram/netlogon.c | 4 ++-- source4/nbt_server/nbt_server.c | 2 +- source4/nbt_server/wins/winsdb.c | 13 ++++++++----- source4/nbt_server/wins/winsserver.c | 3 ++- 4 files changed, 13 insertions(+), 9 deletions(-) (limited to 'source4/nbt_server') diff --git a/source4/nbt_server/dgram/netlogon.c b/source4/nbt_server/dgram/netlogon.c index 46bfaa9381..7fae6bc1f6 100644 --- a/source4/nbt_server/dgram/netlogon.c +++ b/source4/nbt_server/dgram/netlogon.c @@ -54,7 +54,7 @@ static void nbtd_netlogon_getdc(struct dgram_mailslot_handler *dgmslot, return; } - samctx = samdb_connect(packet, iface->nbtsrv->task->lp_ctx, anonymous_session(packet, iface->nbtsrv->task->lp_ctx)); + samctx = samdb_connect(packet, iface->nbtsrv->task->event_ctx, iface->nbtsrv->task->lp_ctx, anonymous_session(packet, iface->nbtsrv->task->event_ctx, iface->nbtsrv->task->lp_ctx)); if (samctx == NULL) { DEBUG(2,("Unable to open sam in getdc reply\n")); return; @@ -125,7 +125,7 @@ static void nbtd_netlogon_getdc2(struct dgram_mailslot_handler *dgmslot, return; } - samctx = samdb_connect(packet, iface->nbtsrv->task->lp_ctx, anonymous_session(packet, iface->nbtsrv->task->lp_ctx)); + samctx = samdb_connect(packet, iface->nbtsrv->task->event_ctx, iface->nbtsrv->task->lp_ctx, anonymous_session(packet, iface->nbtsrv->task->event_ctx, iface->nbtsrv->task->lp_ctx)); if (samctx == NULL) { DEBUG(2,("Unable to open sam in getdc reply\n")); return; diff --git a/source4/nbt_server/nbt_server.c b/source4/nbt_server/nbt_server.c index 2ac1fb4ef3..832bbe0103 100644 --- a/source4/nbt_server/nbt_server.c +++ b/source4/nbt_server/nbt_server.c @@ -66,7 +66,7 @@ static void nbtd_task_init(struct task_server *task) return; } - nbtsrv->sam_ctx = samdb_connect(nbtsrv, task->lp_ctx, anonymous_session(nbtsrv, task->lp_ctx)); + nbtsrv->sam_ctx = samdb_connect(nbtsrv, task->event_ctx, task->lp_ctx, anonymous_session(nbtsrv, task->event_ctx, task->lp_ctx)); if (nbtsrv->sam_ctx == NULL) { task_server_terminate(task, "nbtd failed to open samdb"); return; diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c index 7de5bba468..c84b01f2b2 100644 --- a/source4/nbt_server/wins/winsdb.c +++ b/source4/nbt_server/wins/winsdb.c @@ -945,7 +945,8 @@ failed: return NBT_RCODE_SVR; } -static bool winsdb_check_or_add_module_list(struct loadparm_context *lp_ctx, struct winsdb_handle *h) +static bool winsdb_check_or_add_module_list(struct event_context *ev_ctx, + struct loadparm_context *lp_ctx, struct winsdb_handle *h) { int trans; int ret; @@ -992,7 +993,7 @@ static bool winsdb_check_or_add_module_list(struct loadparm_context *lp_ctx, str flags |= LDB_FLG_NOSYNC; } - h->ldb = ldb_wrap_connect(h, lp_ctx, lock_path(h, lp_ctx, lp_wins_url(lp_ctx)), + h->ldb = ldb_wrap_connect(h, ev_ctx, lp_ctx, lock_path(h, lp_ctx, lp_wins_url(lp_ctx)), NULL, NULL, flags, NULL); if (!h->ldb) goto failed; @@ -1010,7 +1011,9 @@ failed: return false; } -struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, +struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx, + struct event_context *ev_ctx, + struct loadparm_context *lp_ctx, const char *owner, enum winsdb_handle_caller caller) { @@ -1026,7 +1029,7 @@ struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx, struct loadparm_contex flags |= LDB_FLG_NOSYNC; } - h->ldb = ldb_wrap_connect(h, lp_ctx, lock_path(h, lp_ctx, lp_wins_url(lp_ctx)), + h->ldb = ldb_wrap_connect(h, ev_ctx, lp_ctx, lock_path(h, lp_ctx, lp_wins_url(lp_ctx)), NULL, NULL, flags, NULL); if (!h->ldb) goto failed; @@ -1037,7 +1040,7 @@ struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx, struct loadparm_contex if (!h->local_owner) goto failed; /* make sure the module list is available and used */ - ret = winsdb_check_or_add_module_list(lp_ctx, h); + ret = winsdb_check_or_add_module_list(ev_ctx, lp_ctx, h); if (!ret) goto failed; ldb_err = ldb_set_opaque(h->ldb, "winsdb_handle", h); diff --git a/source4/nbt_server/wins/winsserver.c b/source4/nbt_server/wins/winsserver.c index f116c45898..f8901ce09d 100644 --- a/source4/nbt_server/wins/winsserver.c +++ b/source4/nbt_server/wins/winsserver.c @@ -985,7 +985,8 @@ NTSTATUS nbtd_winsserver_init(struct nbtd_server *nbtsrv) owner = iface_n_ip(ifaces, 0); } - nbtsrv->winssrv->wins_db = winsdb_connect(nbtsrv->winssrv, nbtsrv->task->lp_ctx, + nbtsrv->winssrv->wins_db = winsdb_connect(nbtsrv->winssrv, nbtsrv->task->event_ctx, + nbtsrv->task->lp_ctx, owner, WINSDB_HANDLE_CALLER_NBTD); if (!nbtsrv->winssrv->wins_db) { return NT_STATUS_INTERNAL_DB_ERROR; -- cgit