summaryrefslogtreecommitdiff
path: root/source4/nbt_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-30 10:41:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:23 -0500
commit37449657a8d335097b3f3559f8b5bf084b50b85a (patch)
tree4801ffe9f50f78d205fbb299d583ff07a15b4934 /source4/nbt_server
parentc7ded5ab0accc54a28df4d43cb923e6c808ff347 (diff)
downloadsamba-37449657a8d335097b3f3559f8b5bf084b50b85a.tar.gz
samba-37449657a8d335097b3f3559f8b5bf084b50b85a.tar.bz2
samba-37449657a8d335097b3f3559f8b5bf084b50b85a.zip
r5109: - fixed handling of zero-length subcontexts in the ndr library
- added error checking on socket startup in nbtd (This used to be commit 5707ebc9ecdce5c195a2788ab1e4214788a086ea)
Diffstat (limited to 'source4/nbt_server')
-rw-r--r--source4/nbt_server/nbt_server.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/nbt_server/nbt_server.c b/source4/nbt_server/nbt_server.c
index 19dabdfa51..d05a31e421 100644
--- a/source4/nbt_server/nbt_server.c
+++ b/source4/nbt_server/nbt_server.c
@@ -49,6 +49,7 @@ static void nbtd_task_init(struct task_server *task)
{
struct nbt_server *nbtsrv;
struct nbt_interface *iface;
+ NTSTATUS status;
nbtsrv = talloc(task, struct nbt_server);
if (nbtsrv == NULL) {
@@ -59,8 +60,14 @@ static void nbtd_task_init(struct task_server *task)
nbtsrv->task = task;
nbtsrv->interfaces = NULL;
- nbt_startup_interfaces(nbtsrv);
+ /* start listening on the configured network interfaces */
+ status = nbt_startup_interfaces(nbtsrv);
+ if (!NT_STATUS_IS_OK(status)) {
+ task_terminate(task, "nbtd failed to setup interfaces");
+ return;
+ }
+ /* setup the incoming request handler for all our interfaces */
for (iface=nbtsrv->interfaces;iface;iface=iface->next) {
nbt_set_incoming_handler(iface->nbtsock, nbt_request_handler, iface);
}