From 20b5dea237916902437ce3dcdb7c253fd1ad3585 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Wed, 9 Apr 1997 01:19:25 +0000 Subject: Large changes from jra@cygnus.com. Mainly browser updates. access.c: Fixed crash if yp domain unavailable. includes.h: Moved ifdefs for minor platform. interface.c: Changed name of ipgrp to wins_ip to make it clearer. loadparm.c: Changed default of wins support to 'no'. nameannounce.c: Many changes to fix cross subnet browsing. namebrowse.c: Many changes to fix cross subnet browsing. namedbname.c: Many changes to fix cross subnet browsing. namedbresp.c: Many changes to fix cross subnet browsing. namedbsubnet.c: Many changes to fix cross subnet browsing. namedbwork.c: Many changes to fix cross subnet browsing. nameelect.c: Many changes to fix cross subnet browsing. namelogon.c: Many changes to fix cross subnet browsing. namepacket.c: Many changes to fix cross subnet browsing. nameresp.c: Many changes to fix cross subnet browsing. nameserv.c: Many changes to fix cross subnet browsing. nameserv.h: Many changes to fix cross subnet browsing. nameservreply.c: Many changes to fix cross subnet browsing. nameservresp.c: Many changes to fix cross subnet browsing. namework.c: Many changes to fix cross subnet browsing. nmbd.c: Change to search wins subnet. nmbsync.c: Change to check if we are any master before proceeding. proto.h: Added find_subnet_all() and check_work_servertype(). util.c: Moved 'done' settings on name resolution. (This used to be commit a82476eee2c521e5eed092bc367da0a7cef23de1) --- source3/lib/util.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source3/lib/util.c') diff --git a/source3/lib/util.c b/source3/lib/util.c index 643c2fb7a5..53b24173d5 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -3090,12 +3090,10 @@ char *client_name(void) if (done) return name_buf; - done = True; strcpy(name_buf,"UNKNOWN"); if (getpeername(Client, &sa, &length) < 0) { DEBUG(0,("getpeername failed\n")); - done = False; return name_buf; } @@ -3105,7 +3103,6 @@ char *client_name(void) AF_INET)) == 0) { DEBUG(1,("Gethostbyaddr failed for %s\n",client_addr())); StrnCpy(name_buf,client_addr(),sizeof(name_buf) - 1); - done = False; } else { StrnCpy(name_buf,(char *)hp->h_name,sizeof(name_buf) - 1); if (!matchname(name_buf, sockin->sin_addr)) { @@ -3113,6 +3110,7 @@ char *client_name(void) strcpy(name_buf,"UNKNOWN"); } } + done = True; return name_buf; } @@ -3129,7 +3127,6 @@ char *client_addr(void) if (done) return addr_buf; - done = True; strcpy(addr_buf,"0.0.0.0"); if (getpeername(Client, &sa, &length) < 0) { @@ -3139,6 +3136,7 @@ char *client_addr(void) strcpy(addr_buf,(char *)inet_ntoa(sockin->sin_addr)); + done = True; return addr_buf; } -- cgit