diff options
author | Samrat Guha Niyogi <samrat.guha.niyogi@intel.com> | 2016-05-18 20:02:38 +0530 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2016-05-18 12:15:41 -0500 |
commit | 5a031021926470c1005c797ddd15318ed5d25449 (patch) | |
tree | 54905801d1f1e2be925adcc201bd0d9f54ebf8bc | |
parent | 348c8d0da996b9aca9d06c6488046ee314445976 (diff) | |
download | ofono-5a031021926470c1005c797ddd15318ed5d25449.tar.gz |
ril_sofia3gr: Return -EINPROGRESS on disable()
-rw-r--r-- | plugins/ril_sofia3gr.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/ril_sofia3gr.c b/plugins/ril_sofia3gr.c index 86314543..ce29d13e 100644 --- a/plugins/ril_sofia3gr.c +++ b/plugins/ril_sofia3gr.c @@ -255,14 +255,24 @@ static int ril_enable(struct ofono_modem *modem) return -EINPROGRESS; } +static void ril_send_power_off_cb(struct ril_msg *message, gpointer user_data) +{ + struct ofono_modem *modem = (struct ofono_modem *) user_data; + struct ril_data *rd = ofono_modem_get_data(modem); + + g_ril_unref(rd->ril); + + ofono_modem_set_powered(modem, FALSE); +} + static int ril_disable(struct ofono_modem *modem) { struct ril_data *rd = ofono_modem_get_data(modem); DBG("%p", modem); - ril_send_power(rd->ril, FALSE, NULL, NULL, NULL); + ril_send_power(rd->ril, FALSE, ril_send_power_off_cb, modem, NULL); - return 0; + return -EINPROGRESS; } static struct ofono_modem_driver ril_driver = { |