From 571711431885e8e556822c14b3d117025860bf81 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 28 Dec 2010 12:53:12 +0100 Subject: s3: Make node_status_query return NTSTATUS Also make the result talloc'ed Autobuild-User: Volker Lendecke Autobuild-Date: Tue Dec 28 13:46:59 CET 2010 on sn-devel-104 --- source3/utils/nmblookup.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'source3/utils/nmblookup.c') diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c index e5cfe21806..5bbd06c994 100644 --- a/source3/utils/nmblookup.c +++ b/source3/utils/nmblookup.c @@ -113,33 +113,35 @@ static void do_node_status(int fd, { struct nmb_name nname; int count, i, j; - struct node_status *status; + struct node_status *addrs; struct node_status_extra extra; fstring cleanname; char addr[INET6_ADDRSTRLEN]; + NTSTATUS status; print_sockaddr(addr, sizeof(addr), pss); d_printf("Looking up status of %s\n",addr); make_nmb_name(&nname, name, type); - status = node_status_query(fd, &nname, pss, &count, &extra); - if (status) { + status = node_status_query(fd, &nname, pss, talloc_tos(), + &addrs, &count, &extra); + if (NT_STATUS_IS_OK(status)) { for (i=0;i - %s\n", - cleanname,status[i].type, - node_status_flags(status[i].flags)); + cleanname,addrs[i].type, + node_status_flags(addrs[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); + TALLOC_FREE(addrs); } else { d_printf("No reply from %s\n\n",addr); } -- cgit