Commit 0307ee5f authored by Simon Morlat's avatar Simon Morlat
Browse files

fix crash and memleak in test.

parent ede84b4a
......@@ -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);
......
......@@ -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;
}
......
......@@ -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);
}
......
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