diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2020-05-27 17:09:42 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2020-05-27 17:27:37 +0900 |
commit | 50a83fee118967cc8f34cb2f9e41cbb6e7d4ef33 (patch) | |
tree | 38a72f96bd50b146edf44981bad3736aab6c2020 | |
parent | ed62c11fd532794ef3ae49f8dea8bdcfc64f1363 (diff) | |
download | aul-1-50a83fee118967cc8f34cb2f9e41cbb6e7d4ef33.tar.gz aul-1-50a83fee118967cc8f34cb2f9e41cbb6e7d4ef33.tar.bz2 aul-1-50a83fee118967cc8f34cb2f9e41cbb6e7d4ef33.zip |
Fix a bug about removing GSource
- Uses g_source_destroy() instead of g_source_remove()
Error Log:
+---------------------------------------------------------------------------+
| serviceapp[12098]: Source ID 2 was not found when attempting to remove it |
+---------------------------------------------------------------------------+
Change-Id: I1d6c0af10ec94025cee44af8723f541a0a06e703
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r-- | src/aul_worker.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/aul_worker.c b/src/aul_worker.c index 33a5e9aa..ce16572a 100644 --- a/src/aul_worker.c +++ b/src/aul_worker.c @@ -89,11 +89,13 @@ static void __destroy_job(gpointer data) { struct job_s *job = (struct job_s *)data; GSource *source; + GMainContext *context; if (job->tag) { - source = g_main_context_find_source_by_id(NULL, job->tag); + context = g_main_context_get_thread_default(); + source = g_main_context_find_source_by_id(context, job->tag); if (source && !g_source_is_destroyed(source)) - g_source_remove(job->tag); + g_source_destroy(source); } if (job->channel) |