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 b9a5b23..d5db39f 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);
@@ -185,21 +186,21 @@ 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;
fd = telit_sap_open();
if (fd < 0)
return fd;
- 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 fd;
--
1.7.6.2
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono