r9272: Patch for fixing unused variables warning from Jason Mader. Fixes
[ira/wip.git] / source / utils / nmblookup.c
index 3c5a22841eacda18f5bbc2e4dd6118d34d38d108..09148ad37c30df2204f921d3a6f73cfd50720eb8 100644 (file)
@@ -20,8 +20,6 @@
    
 */
 
-#define NO_SYSLOG
-
 #include "includes.h"
 
 extern BOOL AllowDebugChange;
@@ -101,12 +99,13 @@ static void do_node_status(int fd, const char *name, int type, struct in_addr ip
 {
        struct nmb_name nname;
        int count, i, j;
-       struct node_status *status;
+       NODE_STATUS_STRUCT *status;
+       struct node_status_extra extra;
        fstring cleanname;
 
        d_printf("Looking up status of %s\n",inet_ntoa(ip));
        make_nmb_name(&nname, name, type);
-       status = node_status_query(fd,&nname,ip, &count);
+       status = node_status_query(fd,&nname,ip, &count, &extra);
        if (status) {
                for (i=0;i<count;i++) {
                        pull_ascii_fstring(cleanname, status[i].name);
@@ -117,9 +116,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");
 }