aboutsummaryrefslogtreecommitdiff
path: root/plugins/ublox/mm-modem-helpers-ublox.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2019-03-05 10:17:25 +0100
committerAleksander Morgado <aleksander@gnu.org>2019-03-29 10:07:29 +0000
commit0944e592522f932ec72f0e88837252c39bd4df98 (patch)
treeda89013f8f9f11b108d6cb9e955c45a68fb766ab /plugins/ublox/mm-modem-helpers-ublox.c
parent7330f6d5812df26c0518e04eccd3092833c6e4f3 (diff)
ublox: parse +UGCNTRD stats as unsigned 64bit values
[1551646332.583651] (ttyACM2): --> 'AT+UGCNTRD<CR>' [1551646332.626567] (ttyACM2): <-- '<CR><LF>+UGCNTRD: 1,0,0,0,0<CR><LF><CR><LF>+UGCNTRD: 2,1397316870,113728263578,1397316870,113728263578<CR><LF><CR><LF>OK<CR><LF>' [1551646332.627120] Reloading stats failed: Couldn't load primary PDP context 2 statistics: Error parsing session RX bytes
Diffstat (limited to 'plugins/ublox/mm-modem-helpers-ublox.c')
-rw-r--r--plugins/ublox/mm-modem-helpers-ublox.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/ublox/mm-modem-helpers-ublox.c b/plugins/ublox/mm-modem-helpers-ublox.c
index f6bd1c77..847a1676 100644
--- a/plugins/ublox/mm-modem-helpers-ublox.c
+++ b/plugins/ublox/mm-modem-helpers-ublox.c
@@ -1958,19 +1958,19 @@ out:
gboolean
mm_ublox_parse_ugcntrd_response_for_cid (const gchar *response,
guint in_cid,
- guint *out_session_tx_bytes,
- guint *out_session_rx_bytes,
- guint *out_total_tx_bytes,
- guint *out_total_rx_bytes,
+ guint64 *out_session_tx_bytes,
+ guint64 *out_session_rx_bytes,
+ guint64 *out_total_tx_bytes,
+ guint64 *out_total_rx_bytes,
GError **error)
{
GRegex *r;
GMatchInfo *match_info = NULL;
GError *inner_error = NULL;
- guint session_tx_bytes = 0;
- guint session_rx_bytes = 0;
- guint total_tx_bytes = 0;
- guint total_rx_bytes = 0;
+ guint64 session_tx_bytes = 0;
+ guint64 session_rx_bytes = 0;
+ guint64 total_tx_bytes = 0;
+ guint64 total_rx_bytes = 0;
gboolean matched = FALSE;
/* Response may be e.g.:
@@ -1997,22 +1997,22 @@ mm_ublox_parse_ugcntrd_response_for_cid (const gchar *response,
continue;
}
- if (out_session_tx_bytes && !mm_get_uint_from_match_info (match_info, 2, &session_tx_bytes)) {
+ if (out_session_tx_bytes && !mm_get_u64_from_match_info (match_info, 2, &session_tx_bytes)) {
inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "Error parsing session TX bytes");
goto out;
}
- if (out_session_rx_bytes && !mm_get_uint_from_match_info (match_info, 3, &session_rx_bytes)) {
+ if (out_session_rx_bytes && !mm_get_u64_from_match_info (match_info, 3, &session_rx_bytes)) {
inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "Error parsing session RX bytes");
goto out;
}
- if (out_total_tx_bytes && !mm_get_uint_from_match_info (match_info, 4, &total_tx_bytes)) {
+ if (out_total_tx_bytes && !mm_get_u64_from_match_info (match_info, 4, &total_tx_bytes)) {
inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "Error parsing total TX bytes");
goto out;
}
- if (out_total_rx_bytes && !mm_get_uint_from_match_info (match_info, 5, &total_rx_bytes)) {
+ if (out_total_rx_bytes && !mm_get_u64_from_match_info (match_info, 5, &total_rx_bytes)) {
inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "Error parsing total RX bytes");
goto out;
}