int spotlight_init(AFPObj *obj)
{
+ static bool initialized = false;
const char *attributes;
struct sl_ctx *sl_ctx;
+ if (initialized) {
+ return 0;
+ }
+
LOG(log_info, logtype_sl, "Initializing Spotlight");
sl_ctx = talloc_zero(NULL, struct sl_ctx);
tracker_sparql_connection_get_async(sl_ctx->cancellable,
tracker_con_cb, sl_ctx);
+ initialized = true;
return 0;
}
return AFPERR_NOOP;
}
+ spotlight_init(obj);
+
/*
* Process finished glib events
*/