Lots of errors spotted by Alex fixed, added mutexes to accept & I/O, added
"remote" commands to set ACL, start mirror etc.
This commit is contained in:
5
util.c
5
util.c
@@ -16,7 +16,7 @@ void error_init()
|
||||
main_thread = pthread_self();
|
||||
}
|
||||
|
||||
void error(int consult_errno, int close_socket, const char* format, ...)
|
||||
void error(int consult_errno, int close_socket, pthread_mutex_t* unlock, const char* format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
|
||||
@@ -33,6 +33,9 @@ void error(int consult_errno, int close_socket, const char* format, ...)
|
||||
if (close_socket)
|
||||
close(close_socket);
|
||||
|
||||
if (unlock)
|
||||
pthread_mutex_unlock(unlock);
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
if (pthread_equal(pthread_self(), main_thread))
|
||||
|
Reference in New Issue
Block a user