gsm: fix parsing of unsolicited CREG/CGREG response with RAC
This commit is contained in:
@@ -491,8 +491,9 @@ test_creg_match (const char *test,
|
||||
g_assert (data);
|
||||
g_assert (result);
|
||||
|
||||
g_print ("\nTesting %s +CREG %s response...\n",
|
||||
g_print ("\nTesting %s +C%sREG %s response...\n",
|
||||
test,
|
||||
result->cgreg ? "G" : "",
|
||||
solicited ? "solicited" : "unsolicited");
|
||||
|
||||
array = solicited ? data->solicited_creg : data->unsolicited_creg;
|
||||
@@ -743,13 +744,13 @@ test_creg2_gobi_weird_solicited (void *f, gpointer d)
|
||||
}
|
||||
|
||||
static void
|
||||
test_creg2_unsolicited_with_rac (void *f, gpointer d)
|
||||
test_cgreg2_unsolicited_with_rac (void *f, gpointer d)
|
||||
{
|
||||
TestData *data = (TestData *) d;
|
||||
const char *reply = "\r\n+CGREG: 1,\"1422\",\"00000142\",3,\"00\"\r\n";
|
||||
const CregResult result = { 1, 0x1422, 0x0142, 3, 8, FALSE };
|
||||
const CregResult result = { 1, 0x1422, 0x0142, 3, 8, TRUE };
|
||||
|
||||
test_creg_match ("CREG=2 with RAC", FALSE, reply, data, &result);
|
||||
test_creg_match ("CGREG=2 with RAC", FALSE, reply, data, &result);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1272,7 +1273,6 @@ int main (int argc, char **argv)
|
||||
g_test_suite_add (suite, TESTCASE (test_creg2_md400_unsolicited, data));
|
||||
g_test_suite_add (suite, TESTCASE (test_creg2_s8500_wave_unsolicited, data));
|
||||
g_test_suite_add (suite, TESTCASE (test_creg2_gobi_weird_solicited, data));
|
||||
g_test_suite_add (suite, TESTCASE (test_creg2_unsolicited_with_rac, data));
|
||||
|
||||
g_test_suite_add (suite, TESTCASE (test_cgreg1_solicited, data));
|
||||
g_test_suite_add (suite, TESTCASE (test_cgreg1_unsolicited, data));
|
||||
@@ -1280,6 +1280,7 @@ int main (int argc, char **argv)
|
||||
g_test_suite_add (suite, TESTCASE (test_cgreg2_f3607gw_unsolicited, data));
|
||||
g_test_suite_add (suite, TESTCASE (test_cgreg2_md400_unsolicited, data));
|
||||
g_test_suite_add (suite, TESTCASE (test_cgreg2_x220_unsolicited, data));
|
||||
g_test_suite_add (suite, TESTCASE (test_cgreg2_unsolicited_with_rac, data));
|
||||
|
||||
g_test_suite_add (suite, TESTCASE (test_creg_cgreg_multi_unsolicited, data));
|
||||
g_test_suite_add (suite, TESTCASE (test_creg_cgreg_multi2_unsolicited, data));
|
||||
|
Reference in New Issue
Block a user