summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-10-27 01:29:55 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-10-27 01:29:55 +0200
commit9b316185c6701dcba2f07cb2af44dcd3fc5ec05f (patch)
treeb7812e9530d6425faf8719536282995383c57777
parent52f3c3462be269786e7be5c04c1f2bec81d0cd41 (diff)
downloadofono-9b316185c6701dcba2f07cb2af44dcd3fc5ec05f.tar.bz2
atmodem: Add some more GPRS context debug statements
-rw-r--r--drivers/atmodem/gprs-context.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c
index fc253f3a..1b3591d1 100644
--- a/drivers/atmodem/gprs-context.c
+++ b/drivers/atmodem/gprs-context.c
@@ -83,6 +83,8 @@ static void ppp_connect(const char *interface, const char *local,
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
const char *dns[3];
+ DBG("");
+
dns[0] = dns1;
dns[1] = dns2;
dns[2] = 0;
@@ -131,6 +133,8 @@ static gboolean setup_ppp(struct ofono_gprs_context *gc)
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
GAtIO *io;
+ DBG("");
+
io = g_at_chat_get_io(gcd->chat);
g_at_chat_suspend(gcd->chat);
@@ -163,6 +167,8 @@ static void at_cgdata_cb(gboolean ok, GAtResult *result, gpointer user_data)
struct ofono_gprs_context *gc = user_data;
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
+ DBG("ok %d", ok);
+
if (!ok) {
struct ofono_error error;
@@ -186,6 +192,8 @@ static void at_cgdcont_cb(gboolean ok, GAtResult *result, gpointer user_data)
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
char buf[64];
+ DBG("ok %d", ok);
+
if (!ok) {
struct ofono_error error;
@@ -218,6 +226,8 @@ static void at_gprs_activate_primary(struct ofono_gprs_context *gc,
char buf[OFONO_GPRS_MAX_APN_LENGTH + 128];
int len;
+ DBG("cid %u", ctx->cid);
+
gcd->active_context = ctx->cid;
gcd->up_cb = cb;
gcd->cb_data = data;
@@ -240,12 +250,12 @@ static void at_gprs_activate_primary(struct ofono_gprs_context *gc,
}
static void at_gprs_deactivate_primary(struct ofono_gprs_context *gc,
- unsigned int id,
+ unsigned int cid,
ofono_gprs_context_cb_t cb, void *data)
{
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
- DBG("");
+ DBG("cid %u", cid);
gcd->state = STATE_DISABLING;
gcd->down_cb = cb;
@@ -261,6 +271,8 @@ static int at_gprs_context_probe(struct ofono_gprs_context *gc,
struct gprs_context_data *gcd;
struct stat st;
+ DBG("");
+
if (stat(TUN_SYSFS_DIR, &st) < 0) {
ofono_error("Missing support for TUN/TAP devices");
return -ENODEV;