From: Guillaume Lucas <[email protected]>

Using kernel mux, a recursive locking is detected. This issue is
due to the fact that the DLC_AUX is not closed by ofono. This is
not done because the shutdown_device() function in charge of it
is called in the context of an AT callback function and for an
AT sent in this same dlc. Calling the real shutdown_device()
function using a timer solved the issue.
---
 plugins/ifx.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/plugins/ifx.c b/plugins/ifx.c
index 9c2a5c1..3581f80 100644
--- a/plugins/ifx.c
+++ b/plugins/ifx.c
@@ -93,6 +93,7 @@ struct ifx_data {
        guint dlc_poll_count;
        guint dlc_poll_source;
        guint dlc_init_source;
+       guint shutdown_source;
        guint mux_init_timeout;
        guint frame_size;
        int mux_ldisc;
@@ -190,8 +191,9 @@ static void xsim_notify(GAtResult *result, gpointer 
user_data)
        }
 }
 
-static void shutdown_device(struct ifx_data *data)
+static gboolean shutdown_device_cb(gpointer user_data)
 {
+       struct ifx_data *data = user_data;
        int i, fd;
 
        DBG("");
@@ -224,8 +226,18 @@ static void shutdown_device(struct ifx_data *data)
 done:
        g_io_channel_unref(data->device);
        data->device = NULL;
+       data->shutdown_source = 0;
+       return FALSE;
+}
+
+static void shutdown_device(struct ifx_data *data)
+{
+       DBG("");
+       data->shutdown_source = g_timeout_add_seconds(0,
+                                       shutdown_device_cb, data);
 }
 
+
 static void dlc_disconnect(gpointer user_data)
 {
        struct ofono_modem *modem = user_data;
-- 
1.6.3.3

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to