diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-31 02:50:49 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:09:24 -0500 |
commit | 5269fb13a92850b5f22bf9f7640568d5946a43d5 (patch) | |
tree | ef3063fe0aa0061ae7e0c66e9c57e437e21acd4c /source4/libcli/resolve | |
parent | b8ab357df9379e08778555e585fa1e2df97fa5a6 (diff) | |
download | samba-5269fb13a92850b5f22bf9f7640568d5946a43d5.tar.gz samba-5269fb13a92850b5f22bf9f7640568d5946a43d5.tar.bz2 samba-5269fb13a92850b5f22bf9f7640568d5946a43d5.zip |
r5116: fixed build of the nbtlist code
(This used to be commit 506e1e823cd3f652a793db9f4c43147d298b9b8b)
Diffstat (limited to 'source4/libcli/resolve')
-rw-r--r-- | source4/libcli/resolve/nbtlist.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source4/libcli/resolve/nbtlist.c b/source4/libcli/resolve/nbtlist.c index 036e983fd2..08dc90c39d 100644 --- a/source4/libcli/resolve/nbtlist.c +++ b/source4/libcli/resolve/nbtlist.c @@ -62,8 +62,13 @@ static void nbtlist_handler(struct nbt_name_request *req) if (!NT_STATUS_IS_OK(c->status)) { c->state = SMBCLI_REQUEST_ERROR; } else { - c->state = SMBCLI_REQUEST_DONE; - state->reply_addr = talloc_steal(state, state->io_queries[i].out.reply_addr); + if (state->io_queries[i].out.num_addrs < 1) { + c->state = SMBCLI_REQUEST_ERROR; + c->status = NT_STATUS_UNEXPECTED_NETWORK_ERROR; + } else { + c->state = SMBCLI_REQUEST_DONE; + state->reply_addr = talloc_steal(state, state->io_queries[i].out.reply_addrs[0]); + } } done: |