diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-04-01 13:47:25 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-04-01 13:47:25 -0700 |
commit | 544c02da4946f11c64f3e1f682de253a76d3c0a9 (patch) | |
tree | 1cd295436ce097565e0693204ca21f32718f8800 /gatchat/gsmdial.c | |
parent | ef82241deb1208a5551274929be7f8a8476fed36 (diff) | |
download | ofono-544c02da4946f11c64f3e1f682de253a76d3c0a9.tar.bz2 |
Add support for recording PPP sessions in pppdump format
Diffstat (limited to 'gatchat/gsmdial.c')
-rw-r--r-- | gatchat/gsmdial.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gatchat/gsmdial.c b/gatchat/gsmdial.c index d15aaa91..63f1c0f9 100644 --- a/gatchat/gsmdial.c +++ b/gatchat/gsmdial.c @@ -54,6 +54,7 @@ static gboolean option_legacy = FALSE; static gboolean option_ppp = FALSE; static gchar *option_username = NULL; static gchar *option_password = NULL; +static gchar *option_pppdump = NULL; static GAtPPP *ppp; static GAtChat *control; @@ -271,6 +272,9 @@ static void connect_cb(gboolean ok, GAtResult *result, gpointer user_data) } g_at_ppp_set_debug(ppp, gsmdial_debug, "PPP"); + if (option_pppdump) + g_at_ppp_set_recording(ppp, option_pppdump); + g_at_ppp_set_credentials(ppp, option_username, option_password); /* set connect and disconnect callbacks */ @@ -581,7 +585,9 @@ static GOptionEntry options[] = { { "username", 'u', 0, G_OPTION_ARG_STRING, &option_username, "Specify PPP username" }, { "password", 'w', 0, G_OPTION_ARG_STRING, &option_password, - "Specifiy PPP password" }, + "Specify PPP password" }, + { "pppdump", 'D', 0, G_OPTION_ARG_STRING, &option_pppdump, + "Specify pppdump filename" }, { NULL }, }; |