]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/main.c
Possible fixes to afpstats dbus issue
[netatalk.git] / etc / afpd / main.c
index a66e4a86f47dae01bd3a23d6a05a5db8bbc2b07e..cd65f7a9003358971df2d7c6566c0892519f28f7 100644 (file)
@@ -38,6 +38,7 @@
 #include "fork.h"
 #include "uam_auth.h"
 #include "afp_zeroconf.h"
+#include "afpstats.h"
 
 #define AFP_LISTENERS 32
 #define FDSET_SAFETY  5
@@ -311,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);