Author: crh Date: 2004-09-28 02:13:53 +0000 (Tue, 28 Sep 2004) New Revision: 2706
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_3_0/source/utils&rev=2706&nolog=1 Log: The code that prints the remote MAC address (from the statistics section of the response packet) was outside of the if() that determined whether the query was successful or not. As a result, the MAC address would print out even if there was no MAC address. At least the garbage it printed was relatively consistent. :) I moved the MAC printing into the if() block and added an 'else' to print "No reply..." if the query fails. Chris -)----- Modified: branches/SAMBA_3_0/source/utils/nmblookup.c Changeset: Modified: branches/SAMBA_3_0/source/utils/nmblookup.c =================================================================== --- branches/SAMBA_3_0/source/utils/nmblookup.c 2004-09-28 01:12:55 UTC (rev 2705) +++ branches/SAMBA_3_0/source/utils/nmblookup.c 2004-09-28 02:13:53 UTC (rev 2706) @@ -118,12 +118,15 @@ cleanname,status[i].type, node_status_flags(status[i].flags)); } + d_printf("\n\tMAC Address = %02X-%02X-%02X-%02X-%02X-%02X\n", + extra.mac_addr[0], extra.mac_addr[1], + extra.mac_addr[2], extra.mac_addr[3], + extra.mac_addr[4], extra.mac_addr[5]); + d_printf("\n"); SAFE_FREE(status); + } else { + d_printf("No reply from %s\n\n",inet_ntoa(ip)); } - d_printf("\n\tMAC Address = %02X-%02X-%02X-%02X-%02X-%02X\n", - extra.mac_addr[0], extra.mac_addr[1], extra.mac_addr[2], - extra.mac_addr[3], extra.mac_addr[4], extra.mac_addr[5]); - d_printf("\n"); }