1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r2706: 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 -)-----
(This used to be commit 2a5d66791f)
This commit is contained in:
Christopher R. Hertel 2004-09-28 02:13:53 +00:00 committed by Gerald (Jerry) Carter
parent 521268be1c
commit 4a96fb5d12

View File

@ -118,12 +118,15 @@ static void do_node_status(int fd, const char *name, int type, struct in_addr ip
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");
}