]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_dsi.c
Initialize Spotlight from session child
[netatalk.git] / etc / afpd / afp_dsi.c
index 3e5cd47c3cbf4de4438bc6e3e0e2585a9be72417..8e883d4b27e06ad53fd13b03d5f8ad00f8a22c5f 100644 (file)
@@ -44,6 +44,7 @@
 #include "auth.h"
 #include "fork.h"
 #include "dircache.h"
+#include "spotlight.h"
 
 #ifndef SOL_TCP
 #define SOL_TCP IPPROTO_TCP
@@ -492,6 +493,10 @@ void afp_over_dsi(AFPObj *obj)
     int flag = 1;
     setsockopt(dsi->socket, SOL_TCP, TCP_NODELAY, &flag, sizeof(flag));
 
+    /* Initialize Spotlight */
+    if (obj->options.flags & OPTION_SPOTLIGHT)
+        sl_mod_load(_PATH_AFPDUAMPATH "mod_spotlight.so");
+
     /* get stuck here until the end */
     while (1) {
         if (sigsetjmp(recon_jmp, 1) != 0)