From cb791ceb78bbeeb3ae0e504dbed0357a3fd29906 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 1 Apr 2010 20:06:31 -0700 Subject: Remove usage of AT+CGACT for now --- gatchat/gsmdial.c | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/gatchat/gsmdial.c b/gatchat/gsmdial.c index 63f1c0f9..0a833c3b 100644 --- a/gatchat/gsmdial.c +++ b/gatchat/gsmdial.c @@ -285,20 +285,6 @@ static void connect_cb(gboolean ok, GAtResult *result, gpointer user_data) g_at_ppp_open(ppp); } -static void at_cgact_up_cb(gboolean ok, GAtResult *result, gpointer user_data) -{ - char buf[64]; - - if (!ok) { - g_print("Error activating context\n"); - exit(1); - } - - sprintf(buf, "AT+CGDATA=\"PPP\",%u", option_cid); - - g_at_chat_send(modem, buf, none_prefix, connect_cb, NULL, NULL); -} - static void at_cgdcont_cb(gboolean ok, GAtResult *result, gpointer user_data) { char buf[64]; @@ -308,15 +294,12 @@ static void at_cgdcont_cb(gboolean ok, GAtResult *result, gpointer user_data) exit(1); } - if (option_legacy == TRUE) { + if (option_legacy == TRUE) sprintf(buf, "ATD*99***%u#", option_cid); - g_at_chat_send(modem, buf, none_prefix, - connect_cb, NULL, NULL); - } else { - sprintf(buf, "AT+CGACT=1,%u", option_cid); - g_at_chat_send(control, buf, none_prefix, - at_cgact_up_cb, NULL, NULL); - } + else + sprintf(buf, "AT+CGDATA=\"PPP\",%u", option_cid); + + g_at_chat_send(modem, buf, none_prefix, connect_cb, NULL, NULL); } static void setup_context(int status) -- cgit v1.2.3