1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00

Fix daemon to unlink the socket on exit with -s

This commit is contained in:
Josh Elsasser 2007-06-17 15:47:09 +00:00
parent 1636fc70d2
commit 33ade6978b

View file

@ -195,18 +195,15 @@ trylocksock( const char * sockpath )
if( NULL == sockpath )
{
confpath( path, sizeof path, CONF_FILE_SOCKET, 0 );
fd = getsock( path );
sockpath = path;
}
else
{
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;
}