From 30fdd204f44cd06b716736e7fd64942a8d7b6f84 Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Tue, 13 Jun 2000 20:41:15 +0000 Subject: 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) --- source3/utils/nmblookup.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/utils') 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" ); } } -- cgit