diff options
author | Christopher R. Hertel <crh@samba.org> | 2000-06-13 20:41:15 +0000 |
---|---|---|
committer | Christopher R. Hertel <crh@samba.org> | 2000-06-13 20:41:15 +0000 |
commit | 30fdd204f44cd06b716736e7fd64942a8d7b6f84 (patch) | |
tree | 78d61935f4ad7806d0b6745660cc3fc2ee2c479f | |
parent | 898c5ddf071035418dcf3f351a9ecc9904069335 (diff) | |
download | samba-30fdd204f44cd06b716736e7fd64942a8d7b6f84.tar.gz samba-30fdd204f44cd06b716736e7fd64942a8d7b6f84.tar.bz2 samba-30fdd204f44cd06b716736e7fd64942a8d7b6f84.zip |
If I use nmblookup to search for node ZOOB#1B and there is no such name
registered within the search space, nmblookup would report
name_query failed to find name ZOOB
I've changed it to report any non-zero type, so the above message becomes
name_query failed to find name ZOOB#1B
If the query is for ZOOB or even ZOOB#00 then the old style error message
is given.
Chris -)-----
(This used to be commit 5ecf0c61718afbc7106e853d327428bd72f77690)
-rw-r--r-- | source3/utils/nmblookup.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c index 546d2f0e15..15188f6768 100644 --- a/source3/utils/nmblookup.c +++ b/source3/utils/nmblookup.c @@ -261,14 +261,16 @@ int main(int argc,char *argv[]) } p = strchr(lookup,'#'); - if (p) { - *p = 0; - sscanf(p+1,"%x",&lookup_type); + *p = '\0'; + sscanf(++p,"%x",&lookup_type); } if (!query_one(lookup, lookup_type)) { - printf("name_query failed to find name %s\n", lookup); + printf( "name_query failed to find name %s", lookup ); + if( 0 != lookup_type ) + printf( "#%02x", lookup_type ); + printf( "\n" ); } } |