"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tester/proxy_config_tester.c" between
liblinphone-4.5.18.tar.gz and liblinphone-4.5.19.tar.gz

About: Linphone is a cross-platform high-level VoIP library implementing all SIP calling and instant messaging (IM) features within a single API.

proxy_config_tester.c  (liblinphone-4.5.18):proxy_config_tester.c  (liblinphone-4.5.19)
skipping to change at line 274 skipping to change at line 274
routes = linphone_proxy_config_get_routes(marie_cfg); routes = linphone_proxy_config_get_routes(marie_cfg);
BC_ASSERT_PTR_NOT_NULL(routes); BC_ASSERT_PTR_NOT_NULL(routes);
BC_ASSERT_EQUAL(bctbx_list_size(routes), 1, int, "%d"); BC_ASSERT_EQUAL(bctbx_list_size(routes), 1, int, "%d");
route = (const char *)bctbx_list_get_data(routes); route = (const char *)bctbx_list_get_data(routes);
BC_ASSERT_STRING_EQUAL(linphone_proxy_config_get_route(marie_cfg), "sip:s ip.linphone.org"); BC_ASSERT_STRING_EQUAL(linphone_proxy_config_get_route(marie_cfg), "sip:s ip.linphone.org");
BC_ASSERT_STRING_EQUAL(route, "sip:sip.linphone.org"); BC_ASSERT_STRING_EQUAL(route, "sip:sip.linphone.org");
linphone_core_manager_destroy(marie); linphone_core_manager_destroy(marie);
} }
static void multiple_route(void) {
LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc");
LinphoneProxyConfig *marie_cfg = linphone_core_get_default_proxy_config(m
arie->lc);
BC_ASSERT_PTR_NOT_NULL(marie_cfg);
linphone_proxy_config_set_routes(marie_cfg, NULL);// Clear routes
const bctbx_list_t *empty_routes = linphone_proxy_config_get_routes(marie
_cfg);
BC_ASSERT_EQUAL(bctbx_list_size(empty_routes), 0, int, "%d");
bctbx_list_t * new_routes = NULL;
new_routes = bctbx_list_append(new_routes, ms_strdup("<sip:sip.example.or
g;transport=tcp>"));
new_routes = bctbx_list_append(new_routes, ms_strdup("sip:sip.linphone.or
g"));
new_routes = bctbx_list_append(new_routes, ms_strdup("s:sip.linphone.org"
));
new_routes = bctbx_list_append(new_routes, ms_strdup("false_ero\nbad\\url
::"));
linphone_proxy_config_set_routes(marie_cfg, new_routes);
const bctbx_list_t *routes = linphone_proxy_config_get_routes(marie_cfg);
BC_ASSERT_PTR_NOT_NULL(routes);
BC_ASSERT_EQUAL(bctbx_list_size(routes), 2, int, "%d");// 2 are good, 2 a
re bad
const char *route = (const char *)bctbx_list_get_data(routes);
BC_ASSERT_STRING_EQUAL(linphone_proxy_config_get_route(marie_cfg), "<sip:
sip.example.org;transport=tcp>");
BC_ASSERT_STRING_EQUAL(route, "<sip:sip.example.org;transport=tcp>");
route = (const char *)bctbx_list_get_data(bctbx_list_next(routes));
BC_ASSERT_STRING_EQUAL(route, "sip:sip.linphone.org");
linphone_core_manager_destroy(marie);
}
/* /*
* Dependent proxy config scenario: pauline@example.org, marie@example.org and m arie@sip2.linphone.org * Dependent proxy config scenario: pauline@example.org, marie@example.org and m arie@sip2.linphone.org
* marie@sip2.linphone.org is marked 'Dependent' on marie@example.org. * marie@sip2.linphone.org is marked 'Dependent' on marie@example.org.
* Once all registered, we cut the marie@sip2.linphone.org connection. * Once all registered, we cut the marie@sip2.linphone.org connection.
* A call from pauline@example.org to marie@sip2.linphone.org should work (and g o through example.org instead of sip2.linphone.org) * A call from pauline@example.org to marie@sip2.linphone.org should work (and g o through example.org instead of sip2.linphone.org)
*/ */
static void dependent_proxy_config(void) { static void dependent_proxy_config(void) {
LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_externa l_rc"); LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_externa l_rc");
LinphoneCoreManager *marie = linphone_core_manager_new("marie_dependent_p roxy_rc"); LinphoneCoreManager *marie = linphone_core_manager_new("marie_dependent_p roxy_rc");
LinphoneProxyConfig *marie_cfg = linphone_core_get_default_proxy_config(m arie->lc); LinphoneProxyConfig *marie_cfg = linphone_core_get_default_proxy_config(m arie->lc);
skipping to change at line 942 skipping to change at line 972
proxy_config_push_notification_scenario_3(FALSE, TRUE, TRUE); proxy_config_push_notification_scenario_3(FALSE, TRUE, TRUE);
} }
test_t proxy_config_tests[] = { test_t proxy_config_tests[] = {
TEST_NO_TAG("Phone normalization without proxy", phone_normalization_with out_proxy), TEST_NO_TAG("Phone normalization without proxy", phone_normalization_with out_proxy),
TEST_NO_TAG("Phone normalization with proxy", phone_normalization_with_pr oxy), TEST_NO_TAG("Phone normalization with proxy", phone_normalization_with_pr oxy),
TEST_NO_TAG("Phone normalization with dial escape plus", phone_normalizat ion_with_dial_escape_plus), TEST_NO_TAG("Phone normalization with dial escape plus", phone_normalizat ion_with_dial_escape_plus),
TEST_NO_TAG("SIP URI normalization", sip_uri_normalization), TEST_NO_TAG("SIP URI normalization", sip_uri_normalization),
TEST_NO_TAG("Load new default value for proxy config", load_dynamic_proxy _config), TEST_NO_TAG("Load new default value for proxy config", load_dynamic_proxy _config),
TEST_NO_TAG("Single route", single_route), TEST_NO_TAG("Single route", single_route),
TEST_NO_TAG("Multiple routes", multiple_route),
TEST_NO_TAG("Proxy dependency", dependent_proxy_config), TEST_NO_TAG("Proxy dependency", dependent_proxy_config),
TEST_NO_TAG("Dependent proxy dependency register", proxy_config_dependent _register), TEST_NO_TAG("Dependent proxy dependency register", proxy_config_dependent _register),
TEST_NO_TAG("Dependent proxy state changed", proxy_config_dependent_regis ter_state_changed), TEST_NO_TAG("Dependent proxy state changed", proxy_config_dependent_regis ter_state_changed),
TEST_NO_TAG("Dependent proxy dependency removal", dependent_proxy_depende ncy_removal), TEST_NO_TAG("Dependent proxy dependency removal", dependent_proxy_depende ncy_removal),
TEST_ONE_TAG("Dependent proxy dependency with core reloaded", dependent_p roxy_dependency_with_core_reloaded, "LeaksMemory"), TEST_ONE_TAG("Dependent proxy dependency with core reloaded", dependent_p roxy_dependency_with_core_reloaded, "LeaksMemory"),
TEST_ONE_TAG("Push notification params", proxy_config_push_notification_p arams, "Push Notification"), TEST_ONE_TAG("Push notification params", proxy_config_push_notification_p arams, "Push Notification"),
TEST_ONE_TAG("Push notification params 2", proxy_config_push_notification _params_2, "Push Notification"), TEST_ONE_TAG("Push notification params 2", proxy_config_push_notification _params_2, "Push Notification"),
TEST_ONE_TAG("Push notification params 3", proxy_config_push_notification _params_3, "Push Notification"), TEST_ONE_TAG("Push notification params 3", proxy_config_push_notification _params_3, "Push Notification"),
TEST_ONE_TAG("Push notification legacy params", proxy_config_push_notific ation_legacy_params, "Push Notification"), TEST_ONE_TAG("Push notification legacy params", proxy_config_push_notific ation_legacy_params, "Push Notification"),
TEST_ONE_TAG("Push notification legacy params 2", proxy_config_push_notif ication_legacy_params_2, "Push Notification"), TEST_ONE_TAG("Push notification legacy params 2", proxy_config_push_notif ication_legacy_params_2, "Push Notification"),
 End of changes. 2 change blocks. 
0 lines changed or deleted 39 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)