]> code.citadel.org Git - citadel.git/blobdiff - citadel/sysdep.c
Revert xmpp back to a working state
[citadel.git] / citadel / sysdep.c
index f8ff6df46eb0b0c06aa7132e6c80ecdfd12c0bd7..6f14ac4b17d948d02e2f85d46be187346fafb90a 100644 (file)
  */
 
 #include "sysdep.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <ctype.h>
+
+#include <errno.h>
 #include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <sys/socket.h>
+#include <stdio.h>
 #include <syslog.h>
 #include <sys/syslog.h>
 
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
 
-#include <limits.h>
-#include <sys/resource.h>
+#include <sys/un.h>
+#include <sys/types.h>
+#include <sys/socket.h>
 #include <netinet/in.h>
+#include <arpa/inet.h>
 #include <netinet/tcp.h>
 #include <arpa/inet.h>
-#include <netdb.h>
-#include <sys/un.h>
-#include <string.h>
-#include <pwd.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <grp.h>
+
 #define SHOW_ME_VAPPEND_PRINTF
 #include <libcitadel.h>
-#include "citadel.h"
-#include "server.h"
-#include "sysdep_decls.h"
-#include "citserver.h"
-#include "support.h"
-#include "config.h"
-#include "database.h"
-#include "housekeeping.h"
-#include "modules/crypto/serv_crypto.h"        /* Needed for init_ssl, client_write_ssl, client_read_ssl, destruct_ssl */
-#include "ecrash.h"
-#include "context.h"
-
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
 
+#include "citserver.h"
 #include "ctdl_module.h"
-#include "threads.h"
-#include "user_ops.h"
-#include "control.h"
 
+#include "sysdep_decls.h"
+#include "modules/crypto/serv_crypto.h"        /* Needed for init_ssl, client_write_ssl, client_read_ssl, destruct_ssl */
 
+#include "housekeeping.h"
+#include "context.h"
 /*
  * Signal handler to shut down the server.
  */
@@ -1125,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) {
@@ -1222,7 +1189,7 @@ void HuntBadSession(void)
 
 }
 
-
+const char *WorkerLogStr = "W";
 /* 
  * This loop just keeps going and going and going...
  */
@@ -1243,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