Commit 17f57522 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix crash and compilation issue

parent 59b7e88d
...@@ -96,10 +96,12 @@ static void presence_response_event(void *op_base, const belle_sip_response_even ...@@ -96,10 +96,12 @@ static void presence_response_event(void *op_base, const belle_sip_response_even
sal_op_set_error_info_from_response(op,response); sal_op_set_error_info_from_response(op,response);
if (code>=300) { if (code>=300) {
if (strcmp("SUBSCRIBE",belle_sip_request_get_method(request))==0){
ms_message("subscription to [%s] rejected",sal_op_get_to(op)); ms_message("subscription to [%s] rejected",sal_op_get_to(op));
op->base.root->callbacks.notify_presence(op,SalSubscribeTerminated, NULL,NULL); /*NULL = offline*/ op->base.root->callbacks.notify_presence(op,SalSubscribeTerminated, NULL,NULL); /*NULL = offline*/
return; return;
} }
}
set_or_update_dialog(op_base,belle_sip_response_event_get_dialog(event)); set_or_update_dialog(op_base,belle_sip_response_event_get_dialog(event));
if (!op->dialog) { if (!op->dialog) {
ms_message("presence op [%p] receive out of dialog answer [%i]",op,code); ms_message("presence op [%p] receive out of dialog answer [%i]",op,code);
......
...@@ -88,9 +88,11 @@ static void phone_normalization_with_dial_escape_plus(void){ ...@@ -88,9 +88,11 @@ static void phone_normalization_with_dial_escape_plus(void){
#define SIP_URI_CHECK(actual, expected) { \ #define SIP_URI_CHECK(actual, expected) { \
LinphoneProxyConfig *proxy = linphone_proxy_config_new(); \ LinphoneProxyConfig *proxy = linphone_proxy_config_new(); \
LinphoneAddress* res;\
char* actual_str;\
linphone_proxy_config_set_identity(proxy, "sip:username@linphone.org"); \ linphone_proxy_config_set_identity(proxy, "sip:username@linphone.org"); \
LinphoneAddress* res = linphone_proxy_config_normalize_sip_uri(proxy, actual); \ res = linphone_proxy_config_normalize_sip_uri(proxy, actual); \
char* actual_str = linphone_address_as_string_uri_only(res); \ actual_str = linphone_address_as_string_uri_only(res); \
BC_ASSERT_STRING_EQUAL(actual_str, expected); \ BC_ASSERT_STRING_EQUAL(actual_str, expected); \
ms_free(actual_str); \ ms_free(actual_str); \
linphone_address_destroy(res); \ linphone_address_destroy(res); \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment