X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=blobdiff_plain;f=etc%2Fafpd%2Fspotlight_module.c;h=dc0369226270cd2e66e50d3241c7c1ca90be9606;hp=90225721b4213a2813abdfba2f4106d22f6c16c6;hb=4b0e8de531c0eb79598e4a080713ece90da597e4;hpb=dc0f3a5d97e0878f6f0e85ae3ae74ad68be6c037 diff --git a/etc/afpd/spotlight_module.c b/etc/afpd/spotlight_module.c index 90225721..dc036922 100644 --- a/etc/afpd/spotlight_module.c +++ b/etc/afpd/spotlight_module.c @@ -59,7 +59,7 @@ static int sl_mod_init(void *p) GError *error = NULL; const char *msg = p; - LOG(log_info, logtype_sl, "sl_mod_init: %s", msg); + LOG(log_info, logtype_sl, "Initializing Spotlight module"); g_type_init(); setenv("DBUS_SESSION_BUS_ADDRESS", "unix:path=/tmp/spotlight.ipc", 1); @@ -118,12 +118,13 @@ static int sl_mod_start_search(void *p) { EC_INIT; slq_t *slq = p; - const gchar *sparql_query; + gchar *sparql_query; GError *error = NULL; LOG(log_debug, logtype_sl, "sl_mod_start_search: Spotlight query string: \"%s\"", slq->slq_qstring); - EC_NULL_LOG( sparql_query = map_spotlight_to_sparql_query(slq) ); + EC_ZERO_LOGSTR( map_spotlight_to_sparql_query(slq, &sparql_query), + "Mapping Spotlight query failed: \"%s\"", slq->slq_qstring ); LOG(log_debug, logtype_sl, "sl_mod_start_search: SPARQL query: \"%s\"", sparql_query); #if 0