]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/main.c
Merge remote-tracking branch 'origin/develop' into spotlight
[netatalk.git] / etc / afpd / main.c
index 2598a72ecc1424a78a7f902de1fbac0191e4c3d4..411b1a7d772e7ee0ac10595d54a75caaa01d8ef9 100644 (file)
@@ -254,6 +254,13 @@ int main(int ac, char **av)
         afp_exit(EXITERR_SYS);
     }
 #endif
+
+    sv.sa_handler = SIG_IGN;
+    sigemptyset( &sv.sa_mask );
+    if (sigaction(SIGPIPE, &sv, NULL ) < 0 ) {
+        LOG(log_error, logtype_afpd, "main: sigaction: %s", strerror(errno) );
+        afp_exit(EXITERR_SYS);
+    }
     
     sv.sa_handler = afp_goaway; /* handler for all sigs */
 
@@ -344,8 +351,6 @@ int main(int ac, char **av)
 
     /* Initialize */
     cnid_init();
-    if (obj.options.flags & OPTION_SPOTLIGHT)
-        sl_mod_load(_PATH_AFPDUAMPATH "mod_spotlight.so");
 
     /* watch atp, dsi sockets and ipc parent/child file descriptor. */
 
@@ -385,12 +390,17 @@ int main(int ac, char **av)
 
         if (reloadconfig) {
             nologin++;
-            auth_unload();
+
             fd_reset_listening_sockets(&obj);
 
             LOG(log_info, logtype_afpd, "re-reading configuration file");
 
             configfree(&obj, NULL);
+            afp_config_free(&obj);
+
+            if (afp_config_parse(&obj, "afpd") != 0)
+                afp_exit(EXITERR_CONF);
+
             if (configinit(&obj) != 0) {
                 LOG(log_error, logtype_afpd, "config re-read: no servers configured");
                 afp_exit(EXITERR_CONF);