*/
#include "sysdep.h"
-
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/stat.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <syslog.h>
#include <sys/syslog.h>
-
-
+#include <netdb.h>
#include <sys/un.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
-
#define SHOW_ME_VAPPEND_PRINTF
#include <libcitadel.h>
-
#include "citserver.h"
#include "config.h"
#include "ctdl_module.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"
/*
cit_backtrace();
exit(1);
}
- fprintf(fd, "Sending: BufSize: %d BufContent: [",
- nbytes);
+ fprintf(fd, "Sending: BufSize: %d BufContent: [", nbytes);
rv = fwrite(buf, nbytes, 1, fd);
fprintf(fd, "]\n");
fclose(fd);
CtdlDestroyCleanupHooks();
CtdlDestroyFixedOutputHooks();
CtdlDestroySessionHooks();
- CtdlDestroyTDAPVetoHooks();
CtdlDestroyServiceHook();
CtdlDestroyRoomHooks();
CtdlDestroySearchHooks();
if (nFireUpsNonRestart != nFireUps)
{
StrBuf *CrashMail;
- const char *msgs[1] = {"crash"};
- const long lens[1] = {sizeof("crash") - 1};
CrashMail = NewStrBuf();
syslog(LOG_ALERT, "Posting crash message\n");
StrBufPrintf(CrashMail,
" If you have already done this, the core dump is likely to be found at %score.%d\n"
,
ctdl_run_dir, ForkedPid);
- CtdlAideFPMessage(ChrPtr(CrashMail),
- "Citadel server process terminated unexpectedly",
- 1, msgs, lens,
- 0, 0,
- time(NULL));
+ CtdlAideMessage(ChrPtr(CrashMail), "Citadel server process terminated unexpectedly");
FreeStrBuf(&CrashMail);
}
}
++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
server_shutting_down = 1;
continue;
} else {
-#if 0
- syslog(LOG_DEBUG, "Interrupted select()\n");
-#endif
if (server_shutting_down) {
--num_workers;
return(NULL);