]> arthur.barton.de Git - netatalk.git/commitdiff
Fall back to CatSearch if Spotlight module can't be loaded
authorFrank Lahm <franklahm@googlemail.com>
Tue, 16 Oct 2012 20:04:55 +0000 (22:04 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Tue, 16 Oct 2012 20:04:55 +0000 (22:04 +0200)
etc/afpd/spotlight.c

index b5340b6a9049fd4c4d1b6a241518ec14a6cbe9f2..52e2e3404bbc0fd93172df40d1d55e1e774933f1 100644 (file)
@@ -353,7 +353,7 @@ int sl_mod_load(const char *path)
     sl_ctx = talloc_new(NULL);
 
     if ((sl_module = mod_open(path)) == NULL) {
-        LOG(log_error, logtype_sl, "sl_mod_load(%s): failed to load: %s", path, mod_error());
+        LOG(log_error, logtype_sl, "Failed to load: %s", path, mod_error());
         EC_FAIL;
     }
 
@@ -386,6 +386,9 @@ int afp_spotlight_rpc(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_
 
     *rbuflen = 0;
 
+    if (sl_module == NULL)
+        return AFPERR_NOOP;
+
     ibuf += 2;
     ibuflen -= 2;