]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/util/server_ipc.c
Merge master
[netatalk.git] / libatalk / util / server_ipc.c
index 928753b1de7b4f75df2585f08d9431b6f25bacd9..c258398d847d242944eb989d6348e59c84d2290e 100644 (file)
@@ -9,9 +9,7 @@
 #endif 
 
 #include <sys/types.h>
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -189,7 +187,7 @@ int reconnect_ipc(AFPObj *obj)
     obj->ipc_fd = -1;
 
     srandom(getpid());
-    sleep((random() % 10) + 5);  /* give it enough time to start */
+    sleep((random() % 5) + 5);  /* give it enough time to start */
 
     while (retrycount++ < 10) {
         if ((obj->ipc_fd = ipc_client_uds(_PATH_AFP_IPC)) == -1) {
@@ -197,7 +195,7 @@ int reconnect_ipc(AFPObj *obj)
             sleep(1);
             continue;
         }
-        LOG(log_note, logtype_afpd, "reconnect_ipc: succesfull IPC reconnect");
+        LOG(log_debug, logtype_afpd, "reconnect_ipc: succesfull IPC reconnect");
         return 0;
     }
     return -1;
@@ -342,4 +340,3 @@ int ipc_child_write(int fd, uint16_t command, int len, void *msg)
 
    return 0;
 }
-