On 01/11/2016 10:39 PM, [email protected] wrote:
From: Caiwen Zhang <[email protected]>
---
plugins/ril.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/plugins/ril.c b/plugins/ril.c
index ea50d76..688a5bf 100644
--- a/plugins/ril.c
+++ b/plugins/ril.c
@@ -400,9 +400,13 @@ static gboolean connect_rild(gpointer user_data)
int ril_enable(struct ofono_modem *modem)
{
int ret;
+ struct ril_data *rd = ofono_modem_get_data(modem);
DBG("");
+ if (rd->ril)
+ return 0;
+
ret = create_gril(modem);
if (ret < 0)
g_timeout_add_seconds(RILD_CONNECT_RETRY_TIME_S,
Caiwen --
Thanks for the patch! It looks you are catching a valid error scenario,
however although your fix avoids duplicate gril instances from being
created, the correct fix involves cleaning up the gril instance in
ril_disable(), in addition to calling ril_send_power(rd, FALSE, ...).
This scenario is something we never actually exercised on Ubuntu Touch,
as we always power the modem on boot, and only power it off when the
system shuts down.
Regards,
/tony
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono