]> code.citadel.org Git - citadel.git/blobdiff - citadel/server_main.c
* Removed some vestiges
[citadel.git] / citadel / server_main.c
index 3e51f93eac09b7a24d09d2c6d067e7d7d0616b5c..6020ebf541acd82c0956775ca4a2b177c1a56f0e 100644 (file)
@@ -230,7 +230,6 @@ int main(int argc, char **argv)
        end_critical_section(S_WORKER_LIST);
 
        /* Now this thread can become a worker as well. */
-       initial_thread = pthread_self();
        worker_thread(NULL);
 
        /* Server is exiting. Wait for workers to shutdown. */
@@ -243,8 +242,9 @@ int main(int argc, char **argv)
 
                /* avoid deadlock with an exiting thread */
                end_critical_section(S_WORKER_LIST);
-               if ((i = pthread_join(wnp->tid, NULL)))
+               if ((i = pthread_join(wnp->tid, NULL))) {
                        lprintf(CTDL_CRIT, "pthread_join: %s\n", strerror(i));
+               }
                free(wnp);
                begin_critical_section(S_WORKER_LIST);
        }