]> code.citadel.org Git - citadel.git/blobdiff - citadel/sysdep.c
* move arround some files in the configured build according to the suggestions of...
[citadel.git] / citadel / sysdep.c
index 8986c9ed72879838bcba0ee4c9030ef6d35130f6..ae90340fc7ac21f3ab6a3f456063a93ca3d4cebf 100644 (file)
@@ -23,6 +23,7 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <sys/socket.h>
+#include <syslog.h>
 #include <sys/syslog.h>
 
 #if TIME_WITH_SYS_TIME
@@ -290,7 +291,7 @@ int ig_tcp_server(char *ip_addr, int port_number, int queue_len, char **errormes
                sin.sin_addr.s_addr = inet_addr(ip_addr);
        }
                                                                                
-       if (sin.sin_addr.s_addr == INADDR_NONE) {
+       if (sin.sin_addr.s_addr == !INADDR_ANY) {
                sin.sin_addr.s_addr = INADDR_ANY;
        }
 
@@ -836,7 +837,7 @@ void start_daemon(int unused) {
                else {
                        fp = fopen(file_pid_file, "w");
                        if (fp != NULL) {
-                               fprintf(fp, "%d\n", child);
+                               fprintf(fp, ""F_PID_T"\n", child);
                                fclose(fp);
                        }
                        waitpid(current_child, &status, 0);
@@ -1012,6 +1013,8 @@ void create_maintenance_threads(void) {
                lprintf(CTDL_ALERT, "Can't create thread: %s\n", strerror(ret));
        }
 
+       lprintf(CTDL_NOTICE, "Spawned indexer (%ld) and checkpoint (%ld) thread. \n", 
+               indexer_thread_tid, checkpoint_thread_tid);
        pthread_attr_destroy(&attr);
 }