Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8566a17

Browse files
committedFeb 10, 2022
Fix SOA unit test issue i>different ip address and ii>mismatch codec number in sdp with changing test data.
1 parent 70f586b commit 8566a17

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed
 

‎libsofia-sip-ua/soa/test_soa.c

+11-9
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,8 @@ int test_codec_selection(struct context *ctx)
951951
TEST_1(m = b_sdp->sdp_media); TEST_1(!m->m_rejected);
952952
TEST_1(rm = m->m_rtpmaps); TEST(rm->rm_pt, 3);
953953
TEST_S(rm->rm_encoding, "GSM");
954-
/* Not use same payload as remote so 97 from answer */
954+
/* We do not expect payload type as 96 here anymore as we stopped using the same payload type as remote had
955+
since 4703f3ade78a89cdc37f673b5bde3435ab71dc27 so 97 stays. */
955956
TEST_1(rm = rm->rm_next); TEST(rm->rm_pt, 97);
956957
TEST_S(rm->rm_encoding, "G729");
957958
TEST_1(rm = rm->rm_next); TEST(rm->rm_pt, 111);
@@ -1007,10 +1008,10 @@ int test_codec_selection(struct context *ctx)
10071008
TEST_S(rm->rm_encoding, "CN");
10081009
TEST_1(!rm->rm_next);
10091010

1010-
/* Answering end matches payload types
1011-
then sorts by local preference,
1012-
not use same payload type as remote,
1013-
then select best codec => GSM with pt 3 */
1011+
/* Answering end matches payload types then sorts by local preference,
1012+
then select best codec => GSM with pt 3
1013+
Note : we stopped using the same payload type as remote had
1014+
since 4703f3ade78a89cdc37f673b5bde3435ab71dc27 so not expect 97 here. */
10141015
TEST_1(m = b_sdp->sdp_media); TEST_1(!m->m_rejected);
10151016
TEST_1(rm = m->m_rtpmaps); TEST(rm->rm_pt, 3);
10161017
TEST_S(rm->rm_encoding, "GSM");
@@ -1264,7 +1265,8 @@ int test_codec_selection(struct context *ctx)
12641265
TEST_1(!m->m_next);
12651266

12661267
TEST_1(m = b_sdp->sdp_media); TEST_1(!m->m_rejected);
1267-
/* Not use same payload as remote so 97 from answer */
1268+
/* We do not expect payload type as 96 here anymore as we stopped using the same payload type as remote had
1269+
since 4703f3ade78a89cdc37f673b5bde3435ab71dc27 so 97 stays. */
12681270
TEST_1(rm = m->m_rtpmaps); TEST(rm->rm_pt, 97);
12691271
TEST_S(rm->rm_encoding, "G729");
12701272
TEST_1(rm = rm->rm_next); TEST(rm->rm_pt, 111);
@@ -2242,11 +2244,11 @@ int test_address_selection(struct context *ctx)
22422244
TEST_OC_ADDRESS(a, "2001:1508:1003::21a:a0ff:fe71:813", ip6);
22432245
TEST_VOID(soa_terminate(a, NULL));
22442246

2245-
/* SOATAG_AF(SOA_AF_IP4_IP6) and SOATAG_USER_O_LINE() tag remove so, o= mentions IP6 => select IP4 */
2246-
n = soa_set_user_sdp(a, 0, "o=- 1 1 IN IP4 ::\r\n"
2247+
/* SOATAG_AF(SOA_AF_IP4_IP6) and SOATAG_USER_O_LINE() tag remove from so, o= mentions IP6 => select IP6 */
2248+
n = soa_set_user_sdp(a, 0, "o=- 1 1 IN IP6 ::\r\n"
22472249
"m=audio 5008 RTP/AVP 0 8", -1); TEST(n, 1);
22482250
n = soa_generate_offer(a, 1, test_completed); TEST(n, 0);
2249-
TEST_OC_ADDRESS(a, "11.12.13.14", ip4);
2251+
TEST_OC_ADDRESS(a, "2001:1508:1003::21a:a0ff:fe71:813", ip6);
22502252
TEST_VOID(soa_process_reject(a, NULL));
22512253

22522254
/* SOATAG_AF(SOA_AF_IP4_IP6), c= uses non-local IP6

0 commit comments

Comments
 (0)
Please sign in to comment.