]> 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 2265047958dc35f5b56512f272b129d0984652fd..ac1ce217b31904593f30b0ce4aa5d57617df323a 100644 (file)
@@ -312,6 +312,11 @@ int main(int ac, char **av)
     sigaddset(&sigs, SIGCHLD);
 
     pthread_sigmask(SIG_BLOCK, &sigs, NULL);
+#ifdef HAVE_DBUS_GLIB
+    /* Run dbus AFP statics thread */
+    if (obj.options.flags & OPTION_DBUS_AFPSTATS)
+        (void)afpstats_init(server_children);
+#endif
     if (configinit(&obj) != 0) {
         LOG(log_error, logtype_afpd, "main: no servers configured");
         afp_exit(EXITERR_CONF);
@@ -320,18 +325,13 @@ int main(int ac, char **av)
 
     /* Initialize */
     cnid_init();
-    
+
     /* watch atp, dsi sockets and ipc parent/child file descriptor. */
     fd_set_listening_sockets(&obj);
 
     /* set limits */
     (void)setlimits();
 
-#ifdef HAVE_DBUS_GLIB
-    /* Run dbus AFP statics thread */
-    (void)afpstats_init(server_children);
-#endif
-
     afp_child_t *child;
     int recon_ipc_fd;
     pid_t pid;