diff --git a/coreapi/bellesip_sal/sal_impl.c b/coreapi/bellesip_sal/sal_impl.c index 6e3a6cba9..c23e4132e 100644 --- a/coreapi/bellesip_sal/sal_impl.c +++ b/coreapi/bellesip_sal/sal_impl.c @@ -240,6 +240,14 @@ static void process_request_event(void *ud, const belle_sip_request_event_t *eve return; } }else if (strcmp("INVITE",method)==0) { + /*handle the case where we are receiving a request with to tag but it is not belonging to any dialog*/ + belle_sip_header_to_t *to = belle_sip_message_get_header_by_type(req, belle_sip_header_to_t); + if (belle_sip_header_to_get_tag(to) != NULL){ + ms_warning("Receiving INVITE with to-tag but no know dialog here. Rejecting."); + resp=belle_sip_response_create_from_request(req,481); + belle_sip_provider_send_response(sal->prov,resp); + return; + } op=sal_op_new(sal); op->dir=SalOpDirIncoming; sal_op_call_fill_cbs(op); diff --git a/coreapi/chat.c b/coreapi/chat.c index 512e38180..798697fd8 100644 --- a/coreapi/chat.c +++ b/coreapi/chat.c @@ -589,7 +589,7 @@ static void _linphone_chat_room_send_message(LinphoneChatRoom *cr, LinphoneChatM goto error; } uri = belle_generic_uri_parse(transfer_server); - if (uri == NULL) { + if (uri == NULL || belle_generic_uri_get_host(uri)==NULL) { ms_warning("Cannot send file transfer msg: incorrect file transfer server configured '%s'.", transfer_server); goto error; } diff --git a/tester/message_tester.c b/tester/message_tester.c index 7b2925832..2ca3fad47 100644 --- a/tester/message_tester.c +++ b/tester/message_tester.c @@ -219,6 +219,7 @@ static void text_message_within_dialog(void) { BC_ASSERT_PTR_NOT_NULL(linphone_core_get_chat_room(marie->lc,pauline->identity)); + end_call(marie, pauline); linphone_core_manager_destroy(marie); linphone_core_manager_destroy(pauline); }