From bf7c56665c8483c7731eedde4ab567b2b86a5bd6 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 16 Jan 2002 01:41:30 +0000 Subject: Merge of name_status_find() debugs. (This used to be commit cfac669017afa763100e335d1516fbed18049e00) --- source3/libsmb/namequery.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'source3/libsmb/namequery.c') diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index e410363de8..8ac7ae2c6a 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -163,33 +163,46 @@ return the matched name in *name BOOL name_status_find(const char *q_name, int q_type, int type, struct in_addr to_ip, char *name) { - struct node_status *status; + struct node_status *status = NULL; struct nmb_name nname; int count, i; int sock; + BOOL result = False; + + DEBUG(10, ("name_status_find: looking up %s#%x\n", q_name, q_type)); sock = open_socket_in(SOCK_DGRAM, 0, 3, interpret_addr(lp_socket_address()), True); if (sock == -1) - return False; + goto done; /* W2K PDC's seem not to respond to '*'#0. JRA */ make_nmb_name(&nname, q_name, q_type); status = node_status_query(sock, &nname, to_ip, &count); close(sock); if (!status) - return False; + goto done; for (i=0;i