From abb9a2de72073a8a6f332b60d74af9eb6c3d6f25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 20 Dec 2000 03:22:51 +0000 Subject: implemented a much nicer name_status() interface. It now returns a list of structures rather than the dodgy parsing code we had before this also gets smbw working correctly with no initial workgroup (using name_status_find on __MSBROWSE__ returns) (This used to be commit f2be88a8738a39ca5c98936edb7537cd701348a1) --- source3/smbwrapper/smbw.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'source3/smbwrapper') diff --git a/source3/smbwrapper/smbw.c b/source3/smbwrapper/smbw.c index 65a70c9178..91009af1c5 100644 --- a/source3/smbwrapper/smbw.c +++ b/source3/smbwrapper/smbw.c @@ -261,6 +261,7 @@ static char *smbw_find_workgroup(void) char *p; struct in_addr *ip_list = NULL; int count = 0; + int i; /* first off see if an existing workgroup name exists */ p = smbw_getshared("WORKGROUP"); @@ -273,12 +274,21 @@ static char *smbw_find_workgroup(void) if (!name_resolve_bcast(MSBROWSE, 1, &ip_list, &count)) { DEBUG(1,("No workgroups found!")); return p; - } - free((char *)ip_list); + for (i=0;i