From: "Gustavo F. Padovan" <[email protected]>
---
plugins/telit.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/plugins/telit.c b/plugins/telit.c
index 4626c4b..b6d408f 100644
--- a/plugins/telit.c
+++ b/plugins/telit.c
@@ -65,6 +65,7 @@ static const char *rsen_prefix[]= { "#RSEN:", NULL };
struct telit_data {
GAtChat *chat;
+ GAtChat *aux;
struct ofono_sim *sim;
guint sim_inserted_source;
};
@@ -132,8 +133,8 @@ static void rsen_enable_cb(gboolean ok, GAtResult *result,
gpointer user_data)
DBG("%p", modem);
if (!ok) {
- g_at_chat_unref(data->chat);
- data->chat = NULL;
+ g_at_chat_unref(data->aux);
+ data->aux = NULL;
ofono_modem_set_powered(modem, FALSE);
return;
}
@@ -146,8 +147,8 @@ static void rsen_disable_cb(gboolean ok, GAtResult *result,
gpointer user_data)
DBG("%p", modem);
- g_at_chat_unref(data->chat);
- data->chat = NULL;
+ g_at_chat_unref(data->aux);
+ data->aux = NULL;
if (ok)
ofono_modem_set_powered(modem, FALSE);
@@ -184,17 +185,17 @@ static int telit_sap_enable(struct ofono_modem *modem)
DBG("%p", modem);
- data->chat = open_device(modem, "Data", "Aux: ");
- if (data->chat == NULL)
+ data->aux = open_device(modem, "Data", "Aux: ");
+ if (data->aux == NULL)
return -EINVAL;
- g_at_chat_register(data->chat, "#RSEN:", telit_rsen_notify,
+ g_at_chat_register(data->aux, "#RSEN:", telit_rsen_notify,
FALSE, modem, NULL);
- g_at_chat_send(data->chat, "AT#NOPT=3", NULL, NULL, NULL, NULL);
+ g_at_chat_send(data->aux, "AT#NOPT=3", NULL, NULL, NULL, NULL);
/* Set SAP functionality */
- g_at_chat_send(data->chat, "AT#RSEN=1,1,0,2,0", rsen_prefix,
+ g_at_chat_send(data->aux, "AT#RSEN=1,1,0,2,0", rsen_prefix,
rsen_enable_cb, modem, NULL);
return -EINPROGRESS;
--
1.7.6.2
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono