logging problem

Wayne Davison wayned at samba.org
Fri Mar 31 17:45:18 GMT 2006


On Fri, Mar 31, 2006 at 06:11:38PM +0200, Julian Pace Ross wrote:
> What is bothering me is that I lost the ability to write in any file
> other than syslog (/var/log/messages)

The problem turned out to be that a new "connect ..." message was
getting output in the wrong spot.  The attached patch fixes this.
Thanks for letting us know about this!

..wayne..
-------------- next part --------------
--- clientserver.c	24 Feb 2006 01:56:26 -0000	1.177
+++ clientserver.c	31 Mar 2006 17:36:26 -0000
@@ -733,8 +733,6 @@ int start_daemon(int f_in, int f_out)
 	char *host = client_name(f_in);
 	int i;
 
-	rprintf(FLOG, "connect from %s (%s)\n", host, addr);
-
 	io_set_sock_fds(f_in, f_out);
 
 	if (!lp_load(config_file, 0))
@@ -742,6 +740,8 @@ int start_daemon(int f_in, int f_out)
 
 	log_init();
 
+	rprintf(FLOG, "connect from %s (%s)\n", host, addr);
+
 	if (!am_server) {
 		set_socket_options(f_in, "SO_KEEPALIVE");
 		if (sockopts)


More information about the rsync mailing list