From 33ade6978becfb213dd50940518b1b9c2a942a27 Mon Sep 17 00:00:00 2001 From: Josh Elsasser Date: Sun, 17 Jun 2007 15:47:09 +0000 Subject: [PATCH] Fix daemon to unlink the socket on exit with -s --- daemon/daemon.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/daemon/daemon.c b/daemon/daemon.c index 4b685b2af..a33990433 100644 --- a/daemon/daemon.c +++ b/daemon/daemon.c @@ -195,18 +195,15 @@ trylocksock( const char * sockpath ) if( NULL == sockpath ) { confpath( path, sizeof path, CONF_FILE_SOCKET, 0 ); - fd = getsock( path ); - } - else - { - fd = getsock( sockpath ); + sockpath = path; } + fd = getsock( sockpath ); if( 0 > fd ) { return -1; } gl_sockfd = fd; - strlcpy( gl_sockpath, path, sizeof gl_sockpath ); + strlcpy( gl_sockpath, sockpath, sizeof gl_sockpath ); return fd; }