Way back when the module was developed it seemed to be necessary the use
a private context with push/pop as thread default. Maybe there was a bug
in libtracker-sparql dispatching callback in the wrong (global)
context. It's not necessary anymore with a recent libtracker-sparql
version.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
mdssvc_ctx->ev_ctx = ev;
- mdssvc_ctx->gmain_ctx = g_main_context_new();
+ mdssvc_ctx->gmain_ctx = g_main_context_default();
if (mdssvc_ctx->gmain_ctx == NULL) {
DBG_ERR("error from g_main_context_new\n");
return NULL;
}
- /*
- * This ensures all glib threads, especially gioi worker threads
- * dispatch their async callbacks via our gmain_ctx.
- */
- g_main_context_push_thread_default(mdssvc_ctx->gmain_ctx);
-
mdssvc_ctx->glue = samba_tevent_glib_glue_create(ev,
mdssvc_ctx->ev_ctx,
mdssvc_ctx->gmain_ctx);
samba_tevent_glib_glue_quit(mdssvc_ctx->glue);
TALLOC_FREE(mdssvc_ctx->glue);
- g_main_context_pop_thread_default(mdssvc_ctx->gmain_ctx);
-
TALLOC_FREE(mdssvc_ctx);
return true;