aboutsummaryrefslogtreecommitdiff
path: root/src/tests/test-modem-helpers.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2016-03-15 10:33:30 -0500
committerDan Williams <dcbw@redhat.com>2016-03-15 10:34:28 -0500
commit0a9cbf65ea285ebe58b27e1bf40d078504351a80 (patch)
treea17ebac438d4c6fc21815ce29062d3a4aab96644 /src/tests/test-modem-helpers.c
parent8ac075d768cf36b6de19032a2ba208bf3e029cc5 (diff)
modem-helpers: fix handling split PDP context ID reporting in CGDCONT=? response
Cinterion PHS8-US devices send split PDP context ID like "(1-17,101-112)" and that caused the modem-helpers to choke.
Diffstat (limited to 'src/tests/test-modem-helpers.c')
-rw-r--r--src/tests/test-modem-helpers.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tests/test-modem-helpers.c b/src/tests/test-modem-helpers.c
index ddd25af4..4c2d6db6 100644
--- a/src/tests/test-modem-helpers.c
+++ b/src/tests/test-modem-helpers.c
@@ -1831,6 +1831,21 @@ test_cgdcont_test_response_thuraya (void *f, gpointer d)
test_cgdcont_test_results ("Thuraya", reply, &expected[0], G_N_ELEMENTS (expected));
}
+
+static void
+test_cgdcont_test_response_cinterion_phs8 (void *f, gpointer d)
+{
+ const gchar *reply =
+ "+CGDCONT: (1-17,101-116),\"IP\",,,(0),(0-4)\r\n";
+ static MM3gppPdpContextFormat expected[] = {
+ { 1, 17, MM_BEARER_IP_FAMILY_IPV4 }
+ };
+
+ test_cgdcont_test_results ("Cinterion PHS8-USA REVISION 03.001", reply, &expected[0], G_N_ELEMENTS (expected));
+}
+
+
+
/*****************************************************************************/
/* Test CGDCONT read responses */
@@ -2862,6 +2877,7 @@ int main (int argc, char **argv)
g_test_suite_add (suite, TESTCASE (test_cgdcont_test_response_multiple_and_ignore, NULL));
g_test_suite_add (suite, TESTCASE (test_cgdcont_test_response_single_context, NULL));
g_test_suite_add (suite, TESTCASE (test_cgdcont_test_response_thuraya, NULL));
+ g_test_suite_add (suite, TESTCASE (test_cgdcont_test_response_cinterion_phs8, NULL));
g_test_suite_add (suite, TESTCASE (test_cgdcont_read_response_nokia, NULL));
g_test_suite_add (suite, TESTCASE (test_cgdcont_read_response_samsung, NULL));