diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-01-12 03:30:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:50:54 -0500 |
commit | 4b2ed199ca12cedab42683e628eb7e8da6eb0fb4 (patch) | |
tree | b36f513fa0fd6e85fc4518dcf91c08b94433afe1 /source4/libcli | |
parent | 0b3fb7e04d3d572541a0dc4335e72b3fa776c810 (diff) | |
download | samba-4b2ed199ca12cedab42683e628eb7e8da6eb0fb4.tar.gz samba-4b2ed199ca12cedab42683e628eb7e8da6eb0fb4.tar.bz2 samba-4b2ed199ca12cedab42683e628eb7e8da6eb0fb4.zip |
r12861: Cope when we are not supplied the messaging context. This is just
another case where we have to fallback to the node status request.
Andrew Bartlett
(This used to be commit 181064dbcf102de80937fc30b3d3ba5114194a72)
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/finddcs.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/libcli/finddcs.c b/source4/libcli/finddcs.c index ff4b255a13..036b937f69 100644 --- a/source4/libcli/finddcs.c +++ b/source4/libcli/finddcs.c @@ -131,9 +131,15 @@ static void finddcs_name_resolved(struct composite_context *ctx) state->dcs[0].address = talloc_steal(state->dcs, address); - /* Try and find the nbt server. We are not going to fail if - * we can't get the name, it will just be a disapointment. - * The nbt server just might not be running */ + /* Try and find the nbt server. Fallback to a node status + * request if we can't make this happen The nbt server just + * might not be running, or we may not have a messaging + * context (not root etc) */ + if (!state->msg_ctx) { + fallback_node_status(state); + return; + } + nbt_servers = irpc_servers_byname(state->msg_ctx, "nbt_server"); if ((nbt_servers == NULL) || (nbt_servers[0] == 0)) { fallback_node_status(state); |