tester: do not use BC_ASSERT_*_FATAL macros anymore

parent 142727fa
......@@ -111,7 +111,7 @@ if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(BcToolbox_FIND_COMPONENTS tester)
include("${EP_bctoolbox_CONFIG_DIR}/BcToolboxConfig.cmake")
else()
find_package(BcToolbox REQUIRED OPTIONAL_COMPONENTS tester)
find_package(BcToolbox 0.0.3 REQUIRED OPTIONAL_COMPONENTS tester)
endif()
if(ENABLE_TUNNEL)
......
......@@ -35,7 +35,7 @@ endif()
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_bctoolbox_CONFIG_DIR}/BcToolboxConfig.cmake")
else()
find_package(BcToolbox REQUIRED COMPONENTS core)
find_package(BcToolbox 0.0.3 REQUIRED COMPONENTS core)
endif()
if(@ENABLE_TUNNEL@)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
......
......@@ -33,8 +33,8 @@ static void test_authentication(void) {
belle_sip_header_www_authenticate_t* www_authenticate=belle_sip_header_www_authenticate_parse(l_raw_header);
belle_sip_header_authorization_t* authorization = belle_sip_auth_helper_create_authorization(www_authenticate);
belle_sip_header_authorization_set_uri(authorization,belle_sip_uri_parse("sip:sip.linphone.org"));
BC_ASSERT_EQUAL_FATAL(0,belle_sip_auth_helper_compute_ha1("jehan-mac","sip.linphone.org","toto",ha1), int, "%d");
BC_ASSERT_EQUAL_FATAL(0,belle_sip_auth_helper_fill_authorization(authorization,"REGISTER",ha1), int, "%d");
BC_ASSERT_EQUAL(0,belle_sip_auth_helper_compute_ha1("jehan-mac","sip.linphone.org","toto",ha1), int, "%d");
BC_ASSERT_EQUAL(0,belle_sip_auth_helper_fill_authorization(authorization,"REGISTER",ha1), int, "%d");
BC_ASSERT_STRING_EQUAL(belle_sip_header_authorization_get_response(authorization),"77ebf3de72e41934d806175586086508");
belle_sip_object_unref(www_authenticate);
belle_sip_object_unref(authorization);
......@@ -51,8 +51,8 @@ static void test_authentication_qop_auth(void) {
belle_sip_header_authorization_set_nonce_count(authorization,1);
belle_sip_header_authorization_set_qop(authorization,"auth");
belle_sip_header_authorization_set_cnonce(authorization,"8302210f"); /*for testing purpose*/
BC_ASSERT_EQUAL_FATAL(0,belle_sip_auth_helper_compute_ha1("jehan-mac","sip.linphone.org","toto",ha1), int, "%d");
BC_ASSERT_EQUAL_FATAL(0,belle_sip_auth_helper_fill_authorization(authorization,"REGISTER",ha1), int, "%d");
BC_ASSERT_EQUAL(0,belle_sip_auth_helper_compute_ha1("jehan-mac","sip.linphone.org","toto",ha1), int, "%d");
BC_ASSERT_EQUAL(0,belle_sip_auth_helper_fill_authorization(authorization,"REGISTER",ha1), int, "%d");
BC_ASSERT_STRING_EQUAL(belle_sip_header_authorization_get_qop(authorization),"auth");
BC_ASSERT_STRING_EQUAL(belle_sip_header_authorization_get_response(authorization),"694dab8dfe7d50d28ba61e8c43e30666");
BC_ASSERT_EQUAL(belle_sip_header_authorization_get_nonce_count(authorization),1, int, "%d");
......@@ -68,8 +68,8 @@ static void test_proxy_authentication(void) {
belle_sip_header_proxy_authenticate_t* proxy_authenticate=belle_sip_header_proxy_authenticate_parse(l_raw_header);
belle_sip_header_proxy_authorization_t* proxy_authorization = belle_sip_auth_helper_create_proxy_authorization(proxy_authenticate);
belle_sip_header_authorization_set_uri(BELLE_SIP_HEADER_AUTHORIZATION(proxy_authorization),belle_sip_uri_parse("sip:sip.linphone.org"));
BC_ASSERT_EQUAL_FATAL(0,belle_sip_auth_helper_compute_ha1("jehan-mac","sip.linphone.org","toto",ha1), int, "%d");
BC_ASSERT_EQUAL_FATAL(0,belle_sip_auth_helper_fill_proxy_authorization(proxy_authorization,"REGISTER",ha1), int, "%d");
BC_ASSERT_EQUAL(0,belle_sip_auth_helper_compute_ha1("jehan-mac","sip.linphone.org","toto",ha1), int, "%d");
BC_ASSERT_EQUAL(0,belle_sip_auth_helper_fill_proxy_authorization(proxy_authorization,"REGISTER",ha1), int, "%d");
BC_ASSERT_STRING_EQUAL(belle_sip_header_authorization_get_response(BELLE_SIP_HEADER_AUTHORIZATION(proxy_authorization))
,"77ebf3de72e41934d806175586086508");
belle_sip_object_unref(proxy_authenticate);
......@@ -92,30 +92,30 @@ static void test_generate_and_parse_certificates(void) {
belle_sip_warning("Test skipped, self signed certificate generation not available.");
return;
}
BC_ASSERT_EQUAL_FATAL(0, ret, int, "%d");
BC_ASSERT_EQUAL(0, ret, int, "%d");
belle_sip_object_unref(certificate);
belle_sip_object_unref(key);
ret = belle_sip_generate_self_signed_certificate(belle_sip_certificate_temporary_dir, "test_certificate2", &certificate, &key);
BC_ASSERT_EQUAL_FATAL(0, ret, int, "%d");
BC_ASSERT_EQUAL(0, ret, int, "%d");
/* parse directory to get the certificate2 */
ret = belle_sip_get_certificate_and_pkey_in_dir(belle_sip_certificate_temporary_dir, "test_certificate2", &parsed_certificate, &parsed_key, BELLE_SIP_CERTIFICATE_RAW_FORMAT_PEM);
free(belle_sip_certificate_temporary_dir);
BC_ASSERT_EQUAL_FATAL(0, ret, int, "%d");
BC_ASSERT_EQUAL(0, ret, int, "%d");
/* get pem version of generated and parsed certificate and compare them */
pem_certificate = belle_sip_certificates_chain_get_pem(certificate);
BC_ASSERT_PTR_NOT_NULL_FATAL(pem_certificate);
pem_parsed_certificate = belle_sip_certificates_chain_get_pem(parsed_certificate);
BC_ASSERT_PTR_NOT_NULL_FATAL(pem_parsed_certificate);
BC_ASSERT_STRING_EQUAL(pem_certificate, pem_parsed_certificate);
if (BC_ASSERT_PTR_NOT_NULL(pem_certificate) && BC_ASSERT_PTR_NOT_NULL(pem_parsed_certificate)) {
BC_ASSERT_STRING_EQUAL(pem_certificate, pem_parsed_certificate);
}
/* get pem version of generated and parsed key and compare them */
pem_key = belle_sip_signing_key_get_pem(key);
BC_ASSERT_PTR_NOT_NULL_FATAL(pem_key);
pem_parsed_key = belle_sip_signing_key_get_pem(parsed_key);
BC_ASSERT_PTR_NOT_NULL_FATAL(pem_parsed_key);
BC_ASSERT_STRING_EQUAL(pem_key, pem_parsed_key);
if (BC_ASSERT_PTR_NOT_NULL(pem_key) && BC_ASSERT_PTR_NOT_NULL(pem_parsed_key)) {
BC_ASSERT_STRING_EQUAL(pem_key, pem_parsed_key);
}
belle_sip_free(pem_certificate);
belle_sip_free(pem_parsed_certificate);
......@@ -170,9 +170,10 @@ static void test_certificate_fingerprint(void) {
/* generate fingerprint */
fingerprint = belle_sip_certificates_chain_get_fingerprint(cert);
BC_ASSERT_PTR_NOT_NULL_FATAL(fingerprint);
BC_ASSERT_STRING_EQUAL(fingerprint, belle_sip_tester_client_cert_fingerprint);
BC_ASSERT_PTR_NOT_NULL(fingerprint);
if (fingerprint) {
BC_ASSERT_STRING_EQUAL(fingerprint, belle_sip_tester_client_cert_fingerprint);
}
belle_sip_free(fingerprint);
belle_sip_object_unref(cert);
......@@ -181,8 +182,10 @@ static void test_certificate_fingerprint(void) {
/* generate fingerprint */
fingerprint = belle_sip_certificates_chain_get_fingerprint(cert);
BC_ASSERT_PTR_NOT_NULL_FATAL(fingerprint);
BC_ASSERT_STRING_EQUAL(fingerprint, belle_sip_tester_fingerprint256_cert_fingerprint);
BC_ASSERT_PTR_NOT_NULL(fingerprint);
if (fingerprint) {
BC_ASSERT_STRING_EQUAL(fingerprint, belle_sip_tester_fingerprint256_cert_fingerprint);
}
belle_sip_free(fingerprint);
belle_sip_object_unref(cert);
......
......@@ -108,10 +108,11 @@ static void caller_process_request_event(void *user_ctx, const belle_sip_request
}
belle_sip_message("caller_process_request_event received [%s] message",belle_sip_request_get_method(belle_sip_request_event_get_request(event)));
server_transaction=belle_sip_provider_create_server_transaction(prov,belle_sip_request_event_get_request(event));
BC_ASSERT_STRING_EQUAL_FATAL("BYE",belle_sip_request_get_method(belle_sip_request_event_get_request(event)));
BC_ASSERT_STRING_EQUAL("BYE",belle_sip_request_get_method(belle_sip_request_event_get_request(event)));
dialog = belle_sip_transaction_get_dialog(BELLE_SIP_TRANSACTION(server_transaction));
BC_ASSERT_PTR_NOT_NULL_FATAL(dialog);
BC_ASSERT_EQUAL(belle_sip_dialog_get_state(dialog) , BELLE_SIP_DIALOG_CONFIRMED, int, "%d");
if (BC_ASSERT_PTR_NOT_NULL(dialog)) {
BC_ASSERT_EQUAL(belle_sip_dialog_get_state(dialog) , BELLE_SIP_DIALOG_CONFIRMED, int, "%d");
}
resp=belle_sip_response_create_from_request(belle_sip_request_event_get_request(event),200);
belle_sip_server_transaction_send_response(server_transaction,resp);
......@@ -137,7 +138,7 @@ static void callee_process_request_event(void *user_ctx, const belle_sip_request
belle_sip_message("callee_process_request_event received [%s] message",method);
dialog = belle_sip_request_event_get_dialog(event);
if (!dialog ) {
BC_ASSERT_STRING_EQUAL_FATAL("INVITE",method);
BC_ASSERT_STRING_EQUAL("INVITE",method);
dialog=belle_sip_provider_create_dialog(prov,BELLE_SIP_TRANSACTION(server_transaction));
callee_dialog=dialog;
inserv_transaction=server_transaction;
......@@ -178,25 +179,24 @@ static void caller_process_response_event(void *user_ctx, const belle_sip_respon
status = belle_sip_response_get_status_code(belle_sip_response_event_get_response(event));
belle_sip_message("caller_process_response_event [%i]",status);
BC_ASSERT_PTR_NOT_NULL_FATAL(client_transaction);
dialog = belle_sip_transaction_get_dialog(BELLE_SIP_TRANSACTION(client_transaction));
BC_ASSERT_PTR_NOT_NULL_FATAL(dialog);
BC_ASSERT_PTR_EQUAL(caller_dialog,dialog);
if (belle_sip_dialog_get_state(dialog) == BELLE_SIP_DIALOG_NULL) {
BC_ASSERT_EQUAL(status,100, int, "%d");
} else if (belle_sip_dialog_get_state(dialog) == BELLE_SIP_DIALOG_EARLY){
BC_ASSERT_EQUAL(status,180, int, "%d");
/*send 200ok from callee*/
belle_sip_server_transaction_send_response(inserv_transaction,ok_response);
belle_sip_object_unref(ok_response);
ok_response=NULL;
} else if (belle_sip_dialog_get_state(dialog) == BELLE_SIP_DIALOG_CONFIRMED) {
ack=belle_sip_dialog_create_ack(dialog,belle_sip_header_cseq_get_seq_number(invite_cseq));
belle_sip_dialog_send_ack(dialog,ack);
if (BC_ASSERT_PTR_NOT_NULL(client_transaction)) {
dialog = belle_sip_transaction_get_dialog(BELLE_SIP_TRANSACTION(client_transaction));
if (BC_ASSERT_PTR_NOT_NULL(dialog)) {
BC_ASSERT_PTR_EQUAL(caller_dialog,dialog);
if (belle_sip_dialog_get_state(dialog) == BELLE_SIP_DIALOG_NULL) {
BC_ASSERT_EQUAL(status,100, int, "%d");
} else if (belle_sip_dialog_get_state(dialog) == BELLE_SIP_DIALOG_EARLY){
BC_ASSERT_EQUAL(status,180, int, "%d");
/*send 200ok from callee*/
belle_sip_server_transaction_send_response(inserv_transaction,ok_response);
belle_sip_object_unref(ok_response);
ok_response=NULL;
} else if (belle_sip_dialog_get_state(dialog) == BELLE_SIP_DIALOG_CONFIRMED) {
ack=belle_sip_dialog_create_ack(dialog,belle_sip_header_cseq_get_seq_number(invite_cseq));
belle_sip_dialog_send_ack(dialog,ack);
}
}
}
}
static void callee_process_response_event(void *user_ctx, const belle_sip_response_event_t *event){
......@@ -208,17 +208,19 @@ static void callee_process_response_event(void *user_ctx, const belle_sip_respon
belle_sip_message("Message [%p] not for callee, skipping",belle_sip_response_event_get_response(event));
return; /*not for the callee*/
}
BC_ASSERT_PTR_NOT_NULL_FATAL(client_transaction);
dialog = belle_sip_transaction_get_dialog(BELLE_SIP_TRANSACTION(client_transaction));
BC_ASSERT_PTR_NOT_NULL_FATAL(dialog);
BC_ASSERT_PTR_EQUAL(callee_dialog,dialog);
if (belle_sip_dialog_get_state(dialog) == BELLE_SIP_DIALOG_TERMINATED) {
call_endeed=1;
belle_sip_main_loop_quit(belle_sip_stack_get_main_loop(stack));
if (BC_ASSERT_PTR_NOT_NULL(client_transaction)) {
dialog = belle_sip_transaction_get_dialog(BELLE_SIP_TRANSACTION(client_transaction));
if (BC_ASSERT_PTR_NOT_NULL(dialog)) {
BC_ASSERT_PTR_EQUAL(callee_dialog,dialog);
if (belle_sip_dialog_get_state(dialog) == BELLE_SIP_DIALOG_TERMINATED) {
call_endeed=1;
belle_sip_main_loop_quit(belle_sip_stack_get_main_loop(stack));
}
belle_sip_message("callee_process_response_event [%i] on dialog [%p] for state [%s]",status
,dialog
,belle_sip_dialog_state_to_string(belle_sip_dialog_get_state(dialog)));
}
}
belle_sip_message("callee_process_response_event [%i] on dialog [%p] for state [%s]",status
,dialog
,belle_sip_dialog_state_to_string(belle_sip_dialog_get_state(dialog)));
}
......@@ -317,7 +319,7 @@ static void do_simple_call(void) {
client_transaction = belle_sip_provider_create_client_transaction(prov,req);
caller_dialog=belle_sip_provider_create_dialog(prov,BELLE_SIP_TRANSACTION(client_transaction));
BC_ASSERT_PTR_NOT_NULL_FATAL(belle_sip_transaction_get_dialog(BELLE_SIP_TRANSACTION(client_transaction)));
BC_ASSERT_PTR_NOT_NULL(belle_sip_transaction_get_dialog(BELLE_SIP_TRANSACTION(client_transaction)));
//belle_sip_transaction_set_application_data(BELLE_SIP_TRANSACTION(client_transaction),op);
call_endeed=0;
belle_sip_client_transaction_send_request(client_transaction);
......
......@@ -123,9 +123,9 @@ static void test_from_header(void) {
/*test factory*/
L_from = belle_sip_header_from_create2("super <sip:titi.com:5060;lr;ttl=1;method=INVITE;maddr=192.168.0.1;transport=tcp?header=123>","12345-abc");
BC_ASSERT_PTR_NOT_NULL_FATAL(L_from);
if (!BC_ASSERT_PTR_NOT_NULL(L_from)) return;
L_uri = belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(L_from));
BC_ASSERT_PTR_NOT_NULL_FATAL(L_uri);
if (!BC_ASSERT_PTR_NOT_NULL(L_uri)) return;
BC_ASSERT_FALSE(belle_sip_parameters_has_parameter(BELLE_SIP_PARAMETERS(L_uri),"lr"));
BC_ASSERT_FALSE(belle_sip_parameters_has_parameter(BELLE_SIP_PARAMETERS(L_uri),"ttl"));
BC_ASSERT_FALSE(belle_sip_parameters_has_parameter(BELLE_SIP_PARAMETERS(L_uri),"method"));
......@@ -144,12 +144,12 @@ static void test_from_header(void) {
static void test_from_header_with_paramless_address_spec(void) {
belle_generic_uri_t *L_absoluteUri;
belle_sip_header_from_t* L_from = belle_sip_header_from_parse("From: sip:bob@titi.com;tag=dlfjklcn6545614XX");
BC_ASSERT_PTR_NOT_NULL_FATAL(belle_sip_header_from_get_tag(L_from));
if (!BC_ASSERT_PTR_NOT_NULL(belle_sip_header_from_get_tag(L_from))) return;
BC_ASSERT_STRING_EQUAL(belle_sip_header_from_get_tag(L_from),"dlfjklcn6545614XX");
belle_sip_object_unref(L_from);
L_from = belle_sip_header_from_parse("From: tel:1234567;tag=dlfjklcn6545614XX");
BC_ASSERT_PTR_NOT_NULL_FATAL(belle_sip_header_from_get_tag(L_from));
if (!BC_ASSERT_PTR_NOT_NULL(belle_sip_header_from_get_tag(L_from))) return;
L_absoluteUri = belle_sip_header_address_get_absolute_uri(BELLE_SIP_HEADER_ADDRESS(L_from));
BC_ASSERT_PTR_NULL(belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(L_from)));
BC_ASSERT_STRING_EQUAL(belle_generic_uri_get_opaque_part(L_absoluteUri), "1234567");
......@@ -163,12 +163,12 @@ static void test_to_header_with_paramless_address_spec(void) {
belle_generic_uri_t *L_absoluteUri;
belle_sip_header_to_t* L_to = belle_sip_header_to_parse("To: sip:bob@titi.com;tag=dlfjklcn6545614XX");
belle_sip_uri_t *L_uri;
BC_ASSERT_PTR_NOT_NULL_FATAL(belle_sip_header_to_get_tag(L_to));
if (!BC_ASSERT_PTR_NOT_NULL(belle_sip_header_to_get_tag(L_to))) return;
BC_ASSERT_STRING_EQUAL(belle_sip_header_to_get_tag(L_to),"dlfjklcn6545614XX");
belle_sip_object_unref(L_to);
L_to = belle_sip_header_to_parse("To:sip:1002@192.168.1.199;tag=as1f0a0817");
BC_ASSERT_PTR_NOT_NULL_FATAL(belle_sip_header_to_get_tag(L_to));
if (!BC_ASSERT_PTR_NOT_NULL(belle_sip_header_to_get_tag(L_to))) return;
L_uri = belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(L_to));
BC_ASSERT_STRING_EQUAL(belle_sip_uri_get_user(L_uri),"1002");
BC_ASSERT_STRING_EQUAL(belle_sip_uri_get_host(L_uri), "192.168.1.199");
......@@ -177,7 +177,7 @@ static void test_to_header_with_paramless_address_spec(void) {
belle_sip_object_unref(L_to);
L_to = belle_sip_header_to_parse("To: tel:1234567;tag=dlfjklcn6545614XX");
BC_ASSERT_PTR_NOT_NULL_FATAL(belle_sip_header_to_get_tag(L_to));
if (!BC_ASSERT_PTR_NOT_NULL(belle_sip_header_to_get_tag(L_to))) return;
L_absoluteUri = belle_sip_header_address_get_absolute_uri(BELLE_SIP_HEADER_ADDRESS(L_to));
BC_ASSERT_PTR_NULL(belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(L_to)));
BC_ASSERT_STRING_EQUAL(belle_generic_uri_get_opaque_part(L_absoluteUri), "1234567");
......@@ -210,7 +210,7 @@ static void test_to_header(void) {
belle_sip_object_unref(BELLE_SIP_OBJECT(L_to));
/*test factory*/
L_to = belle_sip_header_to_create2("\"super man\" <sip:titi.com:5060;lr;ttl=1;method=INVITE;maddr=192.168.0.1;transport=tcp?header=123>","12345-abc");
BC_ASSERT_PTR_NOT_NULL_FATAL(L_to);
if (!BC_ASSERT_PTR_NOT_NULL(L_to)) return;
L_uri = belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(L_to));
BC_ASSERT_FALSE(belle_sip_parameters_has_parameter(BELLE_SIP_PARAMETERS(L_uri),"lr"));
BC_ASSERT_FALSE(belle_sip_parameters_has_parameter(BELLE_SIP_PARAMETERS(L_uri),"ttl"));
......@@ -220,7 +220,7 @@ static void test_to_header(void) {
BC_ASSERT_FALSE(belle_sip_uri_get_port(L_uri)>0);
BC_ASSERT_EQUAL(belle_sip_list_size(belle_sip_uri_get_header_names(L_uri)),0,int,"%d");
BC_ASSERT_PTR_NOT_NULL_FATAL(L_uri);
if (!BC_ASSERT_PTR_NOT_NULL(L_uri)) return;
BC_ASSERT_STRING_EQUAL(belle_sip_header_address_get_displayname(BELLE_SIP_HEADER_ADDRESS(L_to)), "super man");
BC_ASSERT_STRING_EQUAL(belle_sip_header_to_get_tag(L_to),"12345-abc");
belle_sip_object_unref(L_to);
......@@ -408,10 +408,10 @@ static void test_route_header(void) {
char* l_raw_header;
belle_sip_header_record_route_t* L_record_route;
BC_ASSERT_PTR_NOT_NULL_FATAL(address);
if (!BC_ASSERT_PTR_NOT_NULL(address)) return;
L_route = belle_sip_header_route_create(address);
belle_sip_object_unref(address);
BC_ASSERT_PTR_NOT_NULL_FATAL(L_route);
if (!BC_ASSERT_PTR_NOT_NULL(L_route)) return;
l_raw_header = belle_sip_object_to_string(BELLE_SIP_OBJECT(L_route));
belle_sip_object_unref(BELLE_SIP_OBJECT(L_route));
L_route = belle_sip_header_route_parse(l_raw_header);
......@@ -456,7 +456,7 @@ static void test_service_route_header(void) {
belle_sip_header_service_route_t* L_service_route = belle_sip_header_service_route_parse("Service-Route: <sip:orig@scscf.ims.linphone.com:6060;lr>");
belle_sip_uri_t* L_uri;
char* l_raw_header;
BC_ASSERT_PTR_NOT_NULL_FATAL(L_service_route);
if (!BC_ASSERT_PTR_NOT_NULL(L_service_route)) return;
l_raw_header = belle_sip_object_to_string(BELLE_SIP_OBJECT(L_service_route));
belle_sip_object_unref(BELLE_SIP_OBJECT(L_service_route));
L_service_route = belle_sip_header_service_route_parse(l_raw_header);
......@@ -525,7 +525,7 @@ static void test_authorization_header(void) {
belle_sip_object_unref(BELLE_SIP_OBJECT(L_tmp));
belle_sip_free(l_raw_header);
BC_ASSERT_PTR_NOT_NULL_FATAL(L_authorization);
if (!BC_ASSERT_PTR_NOT_NULL(L_authorization)) return;
BC_ASSERT_STRING_EQUAL(belle_sip_header_authorization_get_scheme(L_authorization), "Digest");
BC_ASSERT_STRING_EQUAL(belle_sip_header_authorization_get_username(L_authorization), "0033482532176");
BC_ASSERT_STRING_EQUAL(belle_sip_header_authorization_get_realm(L_authorization), "sip.ovh.net");
......@@ -569,9 +569,9 @@ static void check_header_authenticate(belle_sip_header_www_authenticate_t* authe
BC_ASSERT_STRING_EQUAL(belle_sip_header_www_authenticate_get_algorithm(authenticate), "MD5");
BC_ASSERT_STRING_EQUAL(belle_sip_header_www_authenticate_get_opaque(authenticate), "1bc7f9097684320");
BC_ASSERT_PTR_NOT_NULL_FATAL(qop=belle_sip_header_www_authenticate_get_qop(authenticate));
if (!BC_ASSERT_PTR_NOT_NULL(qop=belle_sip_header_www_authenticate_get_qop(authenticate))) return;
BC_ASSERT_STRING_EQUAL((const char*)qop->data, "auth");
BC_ASSERT_PTR_NOT_NULL_FATAL(qop=qop->next);
if (!BC_ASSERT_PTR_NOT_NULL(qop=qop->next)) return;
BC_ASSERT_STRING_EQUAL((const char*)qop->data, "auth-int");
BC_ASSERT_STRING_EQUAL(belle_sip_header_www_authenticate_get_qop(authenticate)->data, "auth");
......@@ -804,7 +804,7 @@ static void test_very_long_address_header(void) {
";>"; /*not compliant but*/
belle_sip_header_address_t* laddress = belle_sip_header_address_parse(raw);
BC_ASSERT_PTR_NOT_NULL_FATAL(laddress);
if (!BC_ASSERT_PTR_NOT_NULL(laddress)) return;
L_uri = belle_sip_header_address_get_uri(laddress);
BC_ASSERT_PTR_NOT_NULL(belle_sip_uri_get_user(L_uri));
......@@ -859,9 +859,9 @@ static void test_refer_to_header(void) {
/*test factory*/
L_refer_to = belle_sip_header_refer_to_create((ha=belle_sip_header_address_parse("\"super man\" <sip:titi.com>")));
belle_sip_object_unref(ha);
BC_ASSERT_PTR_NOT_NULL_FATAL(L_refer_to);
if (!BC_ASSERT_PTR_NOT_NULL(L_refer_to)) return;
L_uri = belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(L_refer_to));
BC_ASSERT_PTR_NOT_NULL_FATAL(L_uri);
if (!BC_ASSERT_PTR_NOT_NULL(L_uri)) return;
BC_ASSERT_STRING_EQUAL(belle_sip_header_address_get_displayname(BELLE_SIP_HEADER_ADDRESS(L_refer_to)), "super man");
belle_sip_object_unref(L_refer_to);
BC_ASSERT_PTR_NULL(belle_sip_header_refer_to_parse("nimportequoi"));
......
......@@ -837,7 +837,7 @@ static void testHttpGet(void) {
belle_sip_header_extension_t* host_header;
belle_sip_object_t* tmp;
BC_ASSERT_PTR_NOT_NULL_FATAL(msg);
if (!BC_ASSERT_PTR_NOT_NULL(msg)) return;
marshaled_msg=belle_sip_object_to_string(BELLE_SIP_OBJECT(msg));
belle_sip_object_unref(msg);
......@@ -849,7 +849,7 @@ static void testHttpGet(void) {
BC_ASSERT_TRUE(BELLE_SIP_IS_INSTANCE_OF(msg,belle_http_request_t));
http_request=BELLE_HTTP_REQUEST(msg);
BC_ASSERT_PTR_NOT_NULL_FATAL(uri=belle_http_request_get_uri(http_request));
if (!BC_ASSERT_PTR_NOT_NULL(uri=belle_http_request_get_uri(http_request))) return;
BC_ASSERT_STRING_EQUAL(belle_generic_uri_get_path(uri),"/index.php");
BC_ASSERT_PTR_NOT_NULL(belle_sip_message_get_header(msg,"User-Agent"));
......@@ -882,7 +882,7 @@ static void testHttp200Ok(void) {
belle_sip_header_extension_t* host_header;
belle_sip_object_t* tmp;
BC_ASSERT_PTR_NOT_NULL_FATAL(msg);
if (!BC_ASSERT_PTR_NOT_NULL(msg)) return;
marshaled_msg=belle_sip_object_to_string(BELLE_SIP_OBJECT(msg));
belle_sip_object_unref(msg);
......
......@@ -284,11 +284,12 @@ static void client_process_response_event(void *obj, const belle_sip_response_ev
int family_found;
belle_sip_header_contact_t *ct=belle_sip_message_get_header_by_type(
(belle_sip_message_t*)belle_sip_response_event_get_response(event),belle_sip_header_contact_t);
BC_ASSERT_PTR_NOT_NULL_FATAL(ct);
host=belle_sip_uri_get_host(belle_sip_header_address_get_uri((belle_sip_header_address_t*)ct));
if (strchr(host,':')) family_found=AF_INET6;
else family_found=AF_INET;
BC_ASSERT_EQUAL(family_found,endpoint->connection_family,int,"%d");
if (BC_ASSERT_PTR_NOT_NULL(ct)) {
host=belle_sip_uri_get_host(belle_sip_header_address_get_uri((belle_sip_header_address_t*)ct));
if (strchr(host,':')) family_found=AF_INET6;
else family_found=AF_INET;
BC_ASSERT_EQUAL(family_found,endpoint->connection_family,int,"%d");
}
}
break;
case 401:endpoint->stat.fourHundredOne++; break;
......@@ -366,7 +367,7 @@ static void destroy_endpoint(endpoint_t* endpoint) {
static endpoint_t* create_udp_endpoint(int port,belle_sip_listener_callbacks_t* listener_callbacks) {
endpoint_t *endpoint=create_endpoint("0.0.0.0",port,"udp",listener_callbacks);
BC_ASSERT_PTR_NOT_NULL_FATAL(endpoint->lp);
BC_ASSERT_PTR_NOT_NULL(endpoint->lp);
return endpoint;
}
......@@ -433,26 +434,27 @@ static void refresher_base_with_body(endpoint_t* client
trans=belle_sip_provider_create_client_transaction(client->provider,req);
belle_sip_object_ref(trans);
belle_sip_client_transaction_send_request(trans);
BC_ASSERT_TRUE_FATAL(wait_for(server->stack,client->stack,&client->stat.twoHundredOk,1,1000));
BC_ASSERT_TRUE(wait_for(server->stack,client->stack,&client->stat.twoHundredOk,1,1000));
}
client->refresher= refresher = belle_sip_client_transaction_create_refresher(trans);
}
BC_ASSERT_PTR_NOT_NULL_FATAL(refresher);
belle_sip_object_unref(trans);
belle_sip_refresher_set_listener(refresher,belle_sip_refresher_listener,client);
begin = belle_sip_time_ms();
BC_ASSERT_TRUE(wait_for(server->stack,client->stack,&client->stat.refreshOk,client->register_count+(client->early_refresher?1:0),client->register_count*1000 + 1000));
end = belle_sip_time_ms();
BC_ASSERT_GREATER(end-begin,client->register_count*1000*.9,long,"%ld"); /*because refresh is at 90% of expire*/
BC_ASSERT_LOWER_STRICT(end-begin,(client->register_count*1000 + 2000),long,"%ld");
/*unregister twice to make sure refresh operation can be safely cascaded*/
belle_sip_refresher_refresh(refresher,0);
belle_sip_refresher_refresh(refresher,0);
BC_ASSERT_TRUE(wait_for(server->stack,client->stack,&client->stat.refreshOk,client->register_count+1,1000));
BC_ASSERT_EQUAL(client->stat.refreshOk,client->register_count+1,int,"%d");
belle_sip_refresher_stop(refresher);
belle_sip_object_unref(refresher);
if (BC_ASSERT_PTR_NOT_NULL(refresher)) {
belle_sip_object_unref(trans);
belle_sip_refresher_set_listener(refresher,belle_sip_refresher_listener,client);
begin = belle_sip_time_ms();
BC_ASSERT_TRUE(wait_for(server->stack,client->stack,&client->stat.refreshOk,client->register_count+(client->early_refresher?1:0),client->register_count*1000 + 1000));
end = belle_sip_time_ms();
BC_ASSERT_GREATER(end-begin,client->register_count*1000*.9,long,"%ld"); /*because refresh is at 90% of expire*/
BC_ASSERT_LOWER_STRICT(end-begin,(client->register_count*1000 + 2000),long,"%ld");
/*unregister twice to make sure refresh operation can be safely cascaded*/
belle_sip_refresher_refresh(refresher,0);
belle_sip_refresher_refresh(refresher,0);
BC_ASSERT_TRUE(wait_for(server->stack,client->stack,&client->stat.refreshOk,client->register_count+1,1000));
BC_ASSERT_EQUAL(client->stat.refreshOk,client->register_count+1,int,"%d");
belle_sip_refresher_stop(refresher);
belle_sip_object_unref(refresher);
}
}
static void refresher_base(endpoint_t* client,endpoint_t *server, const char* method) {
refresher_base_with_body(client,server,method,NULL,NULL);
......@@ -565,9 +567,9 @@ static void subscribe_base(int with_resource_lists) {
trans=belle_sip_provider_create_client_transaction(client->provider,req);
belle_sip_object_ref(trans);
belle_sip_client_transaction_send_request(trans);
BC_ASSERT_TRUE_FATAL(wait_for(server->stack,client->stack,&client->stat.twoHundredOk,1,1000));
BC_ASSERT_TRUE(wait_for(server->stack,client->stack,&client->stat.twoHundredOk,1,1000));
/*maybe dialog should be automatically created*/
BC_ASSERT_PTR_NOT_NULL_FATAL(client_dialog = belle_sip_transaction_get_dialog(BELLE_SIP_TRANSACTION(trans)));
BC_ASSERT_PTR_NOT_NULL(client_dialog = belle_sip_transaction_get_dialog(BELLE_SIP_TRANSACTION(trans)));
refresher = belle_sip_client_transaction_create_refresher(trans);
belle_sip_object_unref(trans);
......@@ -589,7 +591,8 @@ static void subscribe_base(int with_resource_lists) {
BC_ASSERT_TRUE(wait_for(server->stack,client->stack,&client->stat.refreshOk,4,4000));
BC_ASSERT_EQUAL(client->stat.dialogTerminated, 0, int, "%i");
BC_ASSERT_NOT_EQUAL(client_dialog, belle_sip_transaction_get_dialog(BELLE_SIP_TRANSACTION(belle_sip_refresher_get_transaction(refresher))),void*,"%p"); /*make sure dialog has changed*/
/*make sure dialog has changed*/
BC_ASSERT_PTR_NOT_EQUAL(client_dialog, belle_sip_transaction_get_dialog(BELLE_SIP_TRANSACTION(belle_sip_refresher_get_transaction(refresher))));
/*unsubscribe twice to make sure refresh operation can be safely cascaded*/
belle_sip_refresher_refresh(refresher,0);
belle_sip_refresher_refresh(refresher,0);
......
......@@ -71,7 +71,9 @@ static void process_response_event(void *user_ctx, const belle_sip_response_even
int status;
belle_sip_request_t* request;
BELLESIP_UNUSED(user_ctx);
BC_ASSERT_PTR_NOT_NULL_FATAL(belle_sip_response_event_get_response(event));
if (!BC_ASSERT_PTR_NOT_NULL(belle_sip_response_event_get_response(event))) {
return;
}
belle_sip_message("process_response_event [%i] [%s]"
,status=belle_sip_response_get_status_code(belle_sip_response_event_get_response(event))
,belle_sip_response_get_reason_phrase(belle_sip_response_event_get_response(event)));
......@@ -81,15 +83,15 @@ static void process_response_event(void *user_ctx, const belle_sip_response_even
belle_sip_header_cseq_t* cseq;
belle_sip_client_transaction_t *t;
belle_sip_uri_t *dest;
// BC_ASSERT_NOT_EQUAL_FATAL(number_of_challenge,2);
BC_ASSERT_PTR_NOT_NULL_FATAL(belle_sip_response_event_get_client_transaction(event)); /*require transaction mode*/
// BC_ASSERT_NOT_EQUAL(number_of_challenge,2);
BC_ASSERT_PTR_NOT_NULL(belle_sip_response_event_get_client_transaction(event)); /*require transaction mode*/
dest=belle_sip_client_transaction_get_route(belle_sip_response_event_get_client_transaction(event));
request=belle_sip_transaction_get_request(BELLE_SIP_TRANSACTION(belle_sip_response_event_get_client_transaction(event)));
cseq=(belle_sip_header_cseq_t*)belle_sip_message_get_header(BELLE_SIP_MESSAGE(request),BELLE_SIP_CSEQ);
belle_sip_header_cseq_set_seq_number(cseq,belle_sip_header_cseq_get_seq_number(cseq)+1);
belle_sip_message_remove_header(BELLE_SIP_MESSAGE(request),BELLE_SIP_AUTHORIZATION);
belle_sip_message_remove_header(BELLE_SIP_MESSAGE(request),BELLE_SIP_PROXY_AUTHORIZATION);
BC_ASSERT_TRUE_FATAL(belle_sip_provider_add_authorization(prov,request,belle_sip_response_event_get_response(event),NULL,NULL,auth_domain));
BC_ASSERT_TRUE(belle_sip_provider_add_authorization(prov,request,belle_sip_response_event_get_response(event),NULL,NULL,auth_domain));
t=belle_sip_provider_create_client_transaction(prov,request);
belle_sip_client_transaction_send_request_to(t,dest);
......@@ -528,15 +530,17 @@ static void test_register_authenticate(void) {
static void test_register_channel_inactive(void){
belle_sip_listening_point_t *lp=belle_sip_provider_get_listening_point(prov,"TCP");
BC_ASSERT_PTR_NOT_NULL_FATAL(lp);
belle_sip_stack_set_inactive_transport_timeout(stack,5);
belle_sip_listening_point_clean_channels(lp);
BC_ASSERT_EQUAL(belle_sip_listening_point_get_channel_count(lp),0,int,"%d");
register_test("tcp",1);
BC_ASSERT_EQUAL(belle_sip_listening_point_get_channel_count(lp),1,int,"%d");
belle_sip_stack_sleep(stack,5000);
BC_ASSERT_EQUAL(belle_sip_listening_point_get_channel_count(lp),0,int,"%d");
belle_sip_stack_set_inactive_transport_timeout(stack,3600);
BC_ASSERT_PTR_NOT_NULL(lp);
if (lp) {
belle_sip_stack_set_inactive_transport_timeout(stack,5);
belle_sip_listening_point_clean_channels(lp);
BC_ASSERT_EQUAL(belle_sip_listening_point_get_channel_count(lp),0,int,"%d");
register_test("tcp",1);
BC_ASSERT_EQUAL(belle_sip_listening_point_get_channel_count(lp),1,int,"%d");
belle_sip_stack_sleep(stack,5000);
BC_ASSERT_EQUAL(belle_sip_listening_point_get_channel_count(lp),0,int,"%d");
belle_sip_stack_set_inactive_transport_timeout(stack,3600);
}
}
......@@ -644,14 +648,15 @@ static void register_dns_load_balancing(void) {
static void process_message_response_event(void *user_ctx, const belle_sip_response_event_t *event){
int status;
BELLESIP_UNUSED(user_ctx);
BC_ASSERT_PTR_NOT_NULL_FATAL(belle_sip_response_event_get_response(event));
belle_sip_message("process_response_event [%i] [%s]"
,status=belle_sip_response_get_status_code(belle_sip_response_event_get_response(event))
,belle_sip_response_get_reason_phrase(belle_sip_response_event_get_response(event)));
if (status >= 200){
is_register_ok=status;
belle_sip_main_loop_quit(belle_sip_stack_get_main_loop(stack));
if (BC_ASSERT_PTR_NOT_NULL(belle_sip_response_event_get_response(event))) {
belle_sip_message("process_response_event [%i] [%s]"
,status=belle_sip_response_get_status_code(belle_sip_response_event_get_response(event))
,belle_sip_response_get_reason_phrase(belle_sip_response_event_get_response(event)));
if (status >= 200){
is_register_ok=status;
belle_sip_main_loop_quit(belle_sip_stack_get_main_loop(stack));
}
}
}
static belle_sip_request_t* send_message(belle_sip_request_t *initial_request, const char* realm){
......@@ -692,7 +697,6 @@ static void reuse_nonce(void) {
int initial_auth_context_count=belle_sip_list_size(prov->auth_contexts);
register_request=register_user_at_domain(stack, prov, "tcp",1,"marie","sip.linphone.org",NULL);
if (register_request) {
char * first_nonce_used;
belle_sip_header_authorization_t * h = NULL;
belle_sip_request_t *message_request;
listener_callbacks.process_dialog_terminated=process_dialog_terminated;
......@@ -713,13 +717,15 @@ static void reuse_nonce(void) {
/*this should reuse previous nonce*/
message_request=send_message(register_request, auth_domain);
BC_ASSERT_EQUAL(is_register_ok, 404,int,"%d");
h = BELLE_SIP_HEADER_AUTHORIZATION(belle_sip_message_get_header_by_type(
h = BELLE_SIP_HEADER_AUTHORIZATION(belle_sip_message_get_header_by_type(
BELLE_SIP_MESSAGE(message_request), belle_sip_header_proxy_authorization_t
));
BC_ASSERT_PTR_NOT_NULL_FATAL(h);
BC_ASSERT_EQUAL(2, belle_sip_header_authorization_get_nonce_count(h),int,"%d");
first_nonce_used = belle_sip_strdup(belle_sip_header_authorization_get_nonce(h));
if (BC_ASSERT_PTR_NOT_NULL(h)) {
char * first_nonce_used;
BC_ASSERT_EQUAL(2, belle_sip_header_authorization_get_nonce_count(h),int,"%d");
first_nonce_used = belle_sip_strdup(belle_sip_header_authorization_get_nonce(h));
belle_sip_free(first_nonce_used);
}
belle_sip_object_unref(message_request);
......@@ -729,7 +735,7 @@ static void reuse_nonce(void) {
h = BELLE_SIP_HEADER_AUTHORIZATION(belle_sip_message_get_header_by_type(
BELLE_SIP_MESSAGE(message_request), belle_sip_header_proxy_authorization_t
));
BC_ASSERT_PTR_NULL_FATAL(h);
BC_ASSERT_PTR_NULL(h);
belle_sip_object_unref(message_request);
......@@ -739,7 +745,7 @@ static void reuse_nonce(void) {
h = BELLE_SIP_HEADER_AUTHORIZATION(belle_sip_message_get_header_by_type(
BELLE_SIP_MESSAGE(message_request), belle_sip_header_proxy_authorization_t
));
BC_ASSERT_PTR_NULL_FATAL(h);
BC_ASSERT_PTR_NULL(h);
belle_sip_object_unref(message_request);
......@@ -749,14 +755,14 @@ static void reuse_nonce(void) {
h = BELLE_SIP_HEADER_AUTHORIZATION(belle_sip_message_get_header_by_type(
BELLE_SIP_MESSAGE(message_request), belle_sip_header_proxy_authorization_t
));
BC_ASSERT_PTR_NOT_NULL_FATAL(h);
BC_ASSERT_EQUAL(3, belle_sip_header_authorization_get_nonce_count(h),int,"%d");
if (BC_ASSERT_PTR_NOT_NULL(h)) {
BC_ASSERT_EQUAL(3, belle_sip_header_authorization_get_nonce_count(h),int,"%d");
}
belle_sip_object_unref(message_request);
belle_sip_provider_remove_sip_listener(prov,BELLE_SIP_LISTENER(listener));
unregister_user(stack,prov,register_request,1);
belle_sip_object_unref(register_request);
belle_sip_free(first_nonce_used);
}
}
......
......@@ -113,7 +113,7 @@ static void ipv4_a_query(void) {
int timeout;
endpoint_t *client = create_endpoint();
BC_ASSERT_PTR_NOT_NULL_FATAL(client);
if (!BC_ASSERT_PTR_NOT_NULL(client)) return;
timeout = belle_sip_stack_get_dns_timeout(client->stack);
client->resolver_ctx = belle_sip_stack_resolve_a(client->stack, IPV4_SIP_DOMAIN, SIP_PORT, AF_INET, a_resolve_done, client);
BC_ASSERT_PTR_NOT_NULL(client->resolver_ctx);
......@@ -140,7 +140,7 @@ static void ipv4_cname_a_query(void) {
int timeout;
endpoint_t *client = create_endpoint();
BC_ASSERT_PTR_NOT_NULL_FATAL(client);
if (!BC_ASSERT_PTR_NOT_NULL(client)) return;
timeout = belle_sip_stack_get_dns_timeout(client->stack);
client->resolver_ctx = belle_sip_stack_resolve_a(client->stack, IPV4_CNAME, SIP_PORT, AF_INET, a_resolve_done, client);
BC_ASSERT_PTR_NOT_NULL(client->resolver_ctx);
......@@ -164,7 +164,7 @@ static void local_query(void) {
int timeout;
endpoint_t *client = create_endpoint();
BC_ASSERT_PTR_NOT_NULL_FATAL(client);
if (!BC_ASSERT_PTR_NOT_NULL(client)) return;
timeout = belle_sip_stack_get_dns_timeout(client->stack);
client->resolver_ctx = belle_sip_stack_resolve_a(client->stack, "localhost", SIP_PORT, AF_INET, a_resolve_done, client);
BC_ASSERT_TRUE(wait_for(client->stack, &client->resolve_done, 1, timeout));
......@@ -183,7 +183,7 @@ static void ipv4_a_query_no_result(void) {
int timeout;
endpoint_t *client = create_endpoint();
BC_ASSERT_PTR_NOT_NULL_FATAL(client);
if (!BC_ASSERT_PTR_NOT_NULL(client)) return;
timeout = belle_sip_stack_get_dns_timeout(client->stack);
client->resolver_ctx = belle_sip_stack_resolve_a(client->stack, IPV4_SIP_BAD_DOMAIN, SIP_PORT, AF_INET, a_resolve_done, client);
BC_ASSERT_PTR_NOT_NULL(client->resolver_ctx);
......@@ -197,7 +197,7 @@ static void ipv4_a_query_no_result(void) {
static void ipv4_a_query_send_failure(void) {
endpoint_t *client = create_endpoint();
BC_ASSERT_PTR_NOT_NULL_FATAL(client);
if (!BC_ASSERT_PTR_NOT_NULL(client)) return;
belle_sip_stack_set_resolver_send_error(client->stack, -1);
client->resolver_ctx = belle_sip_stack_resolve_a(client->stack, IPV4_SIP_DOMAIN, SIP_PORT, AF_INET, a_resolve_done, client);
BC_ASSERT_PTR_NULL(client->resolver_ctx);
......@@ -211,7 +211,7 @@ static void ipv4_a_query_timeout(void) {
endpoint_t *client = create_endpoint();
BC_ASSERT_PTR_NOT_NULL_FATAL(client);
if (!BC_ASSERT_PTR_NOT_NULL(client)) return;
belle_sip_stack_set_dns_timeout(client->stack, 0);
client->resolver_ctx = belle_sip_stack_resolve_a(client->stack, "toto.com", SIP_PORT, AF_INET, a_resolve_done, client);
BC_ASSERT_PTR_NOT_NULL(client->resolver_ctx);
......@@ -226,7 +226,7 @@ static void ipv4_a_query_multiple_results(void) {
int timeout;
endpoint_t *client = create_endpoint();
BC_ASSERT_PTR_NOT_NULL_FATAL(client);
if (!BC_ASSERT_PTR_NOT_NULL(client)) return;
timeout = belle_sip_stack_get_dns_timeout(client->stack);
client->resolver_ctx = belle_sip_stack_resolve_a(client->stack, IPV4_MULTIRES_DOMAIN, SIP_PORT, AF_INET, a_resolve_done, client);
BC_ASSERT_PTR_NOT_NULL(client->resolver_ctx);
......@@ -250,7 +250,7 @@ static void ipv4_a_query_with_v4mapped_results(void) {
client = create_endpoint();
BC_ASSERT_PTR_NOT_NULL_FATAL(client);
if (!BC_ASSERT_PTR_NOT_NULL(client)) return;
timeout = belle_sip_stack_get_dns_timeout(client->stack);
client->resolver_ctx = belle_sip_stack_resolve_a(client->stack, IPV4_SIP_DOMAIN, SIP_PORT, AF_INET6, a_resolve_done, client);
BC_ASSERT_PTR_NOT_NULL(client->resolver_ctx);
......@@ -273,7 +273,7 @@ static void ipv6_aaaa_query(void) {
}
client = create_endpoint();
BC_ASSERT_PTR_NOT_NULL_FATAL(client);
if (!BC_ASSERT_PTR_NOT_NULL(client)) return;
timeout = belle_sip_stack_get_dns_timeout(client->stack);
client->resolver_ctx = belle_sip_stack_resolve_a(client->stack, IPV6_SIP_DOMAIN, SIP_PORT, AF_INET6, a_resolve_done, client);
BC_ASSERT_PTR_NOT_NULL(client->resolver_ctx);
......@@ -325,7 +325,7 @@ static void srv_query(void) {
int timeout;
endpoint_t *client = create_endpoint();
BC_ASSERT_PTR_NOT_NULL_FATAL(client);
if (!BC_ASSERT_PTR_NOT_NULL(client)) return;
timeout = belle_sip_stack_get_dns_timeout(client->stack);