diff options
author | Denis Kenzior <denkenz@gmail.com> | 2011-06-08 04:26:22 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-06-08 04:26:22 -0500 |
commit | b91726213cb50967d7d21d3ac4ca5addb4c2846d (patch) | |
tree | 66db8d22a13e1ded5d157306cf659e1ce52c9461 /plugins/telit.c | |
parent | 56bef41eac1e2b996b8851a3a72fd26d6619c35e (diff) | |
download | ofono-b91726213cb50967d7d21d3ac4ca5addb4c2846d.tar.bz2 |
telit: Use more generic error decoding
Diffstat (limited to 'plugins/telit.c')
-rw-r--r-- | plugins/telit.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/telit.c b/plugins/telit.c index 0b957ec7..9c8eb0d3 100644 --- a/plugins/telit.c +++ b/plugins/telit.c @@ -297,11 +297,10 @@ static void set_online_cb(gboolean ok, GAtResult *result, gpointer user_data) { struct cb_data *cbd = user_data; ofono_modem_online_cb_t cb = cbd->cb; + struct ofono_error error; - if (ok) - CALLBACK_WITH_SUCCESS(cb, cbd->data); - else - CALLBACK_WITH_FAILURE(cb, cbd->data); + decode_at_error(&error, g_at_result_final_response(result)); + cb(&error, cbd->data); } static void telit_set_online(struct ofono_modem *modem, ofono_bool_t online, |