summaryrefslogtreecommitdiff
path: root/source3/lib/util_str.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-10-25 19:07:25 -0700
committerJeremy Allison <jra@samba.org>2007-10-25 19:07:25 -0700
commite054affb7bb3e2aa00663c2d4dfa04c19870ddaf (patch)
tree6f0e23e2314ff7aa8300a273152e311d713a6346 /source3/lib/util_str.c
parent6128d116b3f09ce0b055d2df89b2f7282185782e (diff)
downloadsamba-e054affb7bb3e2aa00663c2d4dfa04c19870ddaf.tar.gz
samba-e054affb7bb3e2aa00663c2d4dfa04c19870ddaf.tar.bz2
samba-e054affb7bb3e2aa00663c2d4dfa04c19870ddaf.zip
Fix bug in writing names into gencache
as well as 2 typos where AF_INET6 was mistypes as AF_INET. JERRY YOU NEED THESE FIXES. Fixes smbclient -L localhost -U% Bugs reported by Kukks (thanks kukks). Jeremy. (This used to be commit f109f82622ca30ae2360e8300152e90b9587ffd8)
Diffstat (limited to 'source3/lib/util_str.c')
-rw-r--r--source3/lib/util_str.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 226bf826fb..1f3aab3bce 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -2280,11 +2280,12 @@ static char *ipstr_list_add(char **ipstr_list, const struct ip_service *service)
return NULL;
}
+ print_sockaddr(addr_buf,
+ sizeof(addr_buf),
+ &service->ss);
+
/* attempt to convert ip to a string and append colon separator to it */
if (*ipstr_list) {
- print_sockaddr(addr_buf,
- sizeof(addr_buf),
- &service->ss);
if (service->ss.ss_family == AF_INET) {
/* IPv4 */
asprintf(&new_ipstr, "%s%s%s:%d",