summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1997-09-11 20:17:32 +0000
committerJeremy Allison <jra@samba.org>1997-09-11 20:17:32 +0000
commit30416c0b8a0f54f6cc1179c2e00860eaf5f58401 (patch)
tree09137fd9f782aaf0df42e59aff10953ed95bed32 /source3/utils
parent77df5c87c69ea7f929df211c41da522248d73cfc (diff)
downloadsamba-30416c0b8a0f54f6cc1179c2e00860eaf5f58401.tar.gz
samba-30416c0b8a0f54f6cc1179c2e00860eaf5f58401.tar.bz2
samba-30416c0b8a0f54f6cc1179c2e00860eaf5f58401.zip
charcnv.c client.c clitar.c kanji.c kanji.h loadparm.c
mangle.c smb.h util.c: Big merge to allow KANJI support to be in the main binary without explicitly compiling with it. locking.c: Fix for smbstatus not being able to read files. namepacket.c: Removed unneccesary debug statement. trans2.c: Added Luke's proposed fix (ifdefed out until further testing). nmblookup.c: Fixed bug where query fails and status is done on bogus IP. Jeremy (jallison@whistle.com) (This used to be commit 9196255022ae8c51b527412747b324819bea2c13)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/nmblookup.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c
index 582f4eb6db..25c94dcd6a 100644
--- a/source3/utils/nmblookup.c
+++ b/source3/utils/nmblookup.c
@@ -192,17 +192,25 @@ int main(int argc,char *argv[])
retries = 1;
}
- if (name_query(ServerFD,lookup,lookup_type,bcast,True,
+ if (name_query(ServerFD,lookup,lookup_type,bcast,True,
bcast_addr,&ip,NULL))
- {
- printf("%s %s\n",inet_ntoa(ip),lookup);
- }
+ {
+ printf("%s %s\n",inet_ntoa(ip),lookup);
+
+ /* We can only do find_status if the ip address returned
+ was valid - ie. name_query returned true.
+ */
if (find_status)
{
printf("Looking up status of %s\n",inet_ntoa(ip));
name_status(ServerFD,lookup,lookup_type,True,ip,NULL,NULL,NULL);
printf("\n");
}
+ }
+ else
+ {
+ printf("name_query failed to find name %s\n", lookup);
+ }
}
return(0);