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:
mbloch
2012-05-29 00:59:12 +01:00
parent c54d4a68ba
commit dcb1633b8b
10 changed files with 120 additions and 28 deletions

5
util.c
View File

@@ -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))