add whether we're in which eventloop / a worker thread to the log output.
[citadel.git] / citadel / sysdep.c
index 42323b163c9350a3048773c95827cef5caaf67b8..6f14ac4b17d948d02e2f85d46be187346fafb90a 100644 (file)
@@ -1092,7 +1092,7 @@ void checkcrash(void)
  */
 int convert_login(char NameToConvert[]) {
        struct passwd *pw;
-       int a;
+       unsigned int a;
 
        pw = getpwnam(NameToConvert);
        if (pw == NULL) {
@@ -1189,7 +1189,7 @@ void HuntBadSession(void)
 
 }
 
-
+const char *WorkerLogStr = "W";
 /* 
  * This loop just keeps going and going and going...
  */
@@ -1210,6 +1210,8 @@ void *worker_thread(void *blah) {
        ++num_workers;
        pthread_mutex_unlock(&ThreadCountMutex);
 
+       pthread_setspecific(evConKey, WorkerLogStr);
+
        while (!server_shutting_down) {
 
                /* make doubly sure we're not holding any stale db handles