summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/ndr/ndr.c3
-rw-r--r--source4/nbt_server/nbt_server.c9
2 files changed, 8 insertions, 4 deletions
diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c
index 032c743bef..f76bb7c48c 100644
--- a/source4/librpc/ndr/ndr.c
+++ b/source4/librpc/ndr/ndr.c
@@ -441,7 +441,6 @@ static NTSTATUS ndr_pull_subcontext_header(struct ndr_pull *ndr,
switch (sub_size) {
case 0: {
uint32_t size = ndr->data_size - ndr->offset;
- if (size == 0) return NT_STATUS_OK;
NDR_CHECK(ndr_pull_subcontext(ndr, ndr2, size));
break;
}
@@ -449,7 +448,6 @@ static NTSTATUS ndr_pull_subcontext_header(struct ndr_pull *ndr,
case 2: {
uint16_t size;
NDR_CHECK(ndr_pull_uint16(ndr, &size));
- if (size == 0) return NT_STATUS_OK;
NDR_CHECK(ndr_pull_subcontext(ndr, ndr2, size));
break;
}
@@ -457,7 +455,6 @@ static NTSTATUS ndr_pull_subcontext_header(struct ndr_pull *ndr,
case 4: {
uint32_t size;
NDR_CHECK(ndr_pull_uint32(ndr, &size));
- if (size == 0) return NT_STATUS_OK;
NDR_CHECK(ndr_pull_subcontext(ndr, ndr2, size));
break;
}
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);
}