diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-09-20 08:28:13 +0900 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-09-20 08:28:13 +0900 |
commit | 9f906504a572c08a8767380ca4d0511af757e798 (patch) | |
tree | 389e0982ad9b9566131bee7080118bae69568807 /drivers | |
parent | 5d569e2ee6d9824a4c69fa3587d576220af20049 (diff) | |
download | ofono-9f906504a572c08a8767380ca4d0511af757e798.tar.bz2 |
atmodem: Allow setting PPP debug via environment variable
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atmodem/gprs-context.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c index a9d69c6c..c90d6c2e 100644 --- a/drivers/atmodem/gprs-context.c +++ b/drivers/atmodem/gprs-context.c @@ -65,6 +65,11 @@ struct gprs_context_data { void *cb_data; /* Callback data */ }; +static void ppp_debug(const char *str, void *data) +{ + ofono_info("%s: %s", (const char *) data, str); +} + static void ppp_connect(const char *interface, const char *local, const char *remote, const char *dns1, const char *dns2, @@ -134,6 +139,9 @@ static gboolean setup_ppp(struct ofono_gprs_context *gc) return FALSE; } + if (getenv("OFONO_PPP_DEBUG")) + g_at_ppp_set_debug(gcd->ppp, ppp_debug, "PPP"); + g_at_ppp_set_credentials(gcd->ppp, gcd->username, gcd->password); /* set connect and disconnect callbacks */ |