[connection] Modified logic so that callback is sent to their respective thread 14/56314/1
authorSaurav Babu <saurav.babu@samsung.com>
Wed, 6 Jan 2016 09:26:19 +0000 (14:56 +0530)
committerSaurav Babu <saurav.babu@samsung.com>
Wed, 6 Jan 2016 09:34:01 +0000 (15:04 +0530)
commitb01eea35eff794e559431b1fb43d60efbcfc2133
treecfa93935e477c7e17bdb44fa2141c6fcab4e019b
parent490359ab1d5d464a34e3815d65bfe4d8b1bacca5
[connection] Modified logic so that callback is sent to their respective thread

Currently for sending few callbacks to application g_idle_add_full() is
used. g_idle_add_full() adds the callback in global main context of the
application and not the context in which thread was operating. See
description at https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#g-idle-add-full
This patch modifies the logic to create a g_idle_source_new() and then
attach this source to the thread's context rather than global main
context of application.

Change-Id: I5b9b927760ab2281cfd3878a3c7583bc4a00e74f
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
src/libnetwork.c