diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-07-12 07:35:36 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-06 20:07:22 +0200 |
commit | 433c8fa85b67a8ba691876aebd7b92129be2986f (patch) | |
tree | ba4fce983750af09d9f60041d91e2369050329b7 /plugins | |
parent | b25b7f91cb625c4a89e1322797b2fa03134ddc3c (diff) |
huawei: report connection status statistics
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/huawei/mm-broadband-modem-huawei.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c index d1cb4178..824937a8 100644 --- a/plugins/huawei/mm-broadband-modem-huawei.c +++ b/plugins/huawei/mm-broadband-modem-huawei.c @@ -73,6 +73,15 @@ huawei_status_changed (MMAtSerialPort *port, GMatchInfo *match_info, MMBroadbandModemHuawei *self) { + gchar *str; + gint n1, n2, n3, n4, n5, n6, n7; + + str = g_match_info_fetch (match_info, 1); + if (sscanf (str, "%x,%x,%x,%x,%x,%x,%x", &n1, &n2, &n3, &n4, &n5, &n6, &n7)) { + mm_dbg ("Duration: %d Up: %d Kbps Down: %d Kbps Total: %d Total: %d\n", + n1, n2 * 8 / 1000, n3 * 8 / 1000, n4 / 1024, n5 / 1024); + } + g_free (str); } static void |