Commit 89192561 authored by jehan's avatar jehan

fix sdp issue

parent 5fb30729
......@@ -50,7 +50,10 @@ const belle_sip_header_call_id_t *belle_sip_dialog_get_call_id(const belle_sip_d
const belle_sip_header_address_t *belle_sip_get_local_party(const belle_sip_dialog_t *dialog);
const belle_sip_header_address_t *belle_sip_get_remote_party(const belle_sip_dialog_t *dialog);
/*
* get the value of the last cseq used to issue a request
*@return local cseq
* */
unsigned int belle_sip_dialog_get_local_seq_number(const belle_sip_dialog_t *dialog);
unsigned int belle_sip_dialog_get_remote_seq_number(const belle_sip_dialog_t *dialog);
......
......@@ -874,7 +874,8 @@ BELLE_SDP_PARSE(session_description)
belle_sdp_session_description_t* belle_sdp_session_description_create(belle_sip_message_t* message) {
belle_sdp_session_description_t* session_desc=NULL;
belle_sip_header_content_type_t* content_type=belle_sip_message_get_header_by_type(message,belle_sip_header_content_type_t);
if (strcmp("application",belle_sip_header_content_type_get_type(content_type))==0
if (content_type
&& strcmp("application",belle_sip_header_content_type_get_type(content_type))==0
&& strcmp("sdp",belle_sip_header_content_type_get_subtype(content_type))==0) {
session_desc=belle_sdp_session_description_parse(belle_sip_message_get_body(message));
}
......
......@@ -136,6 +136,7 @@ static void callee_process_request_event(void *user_ctx, const belle_sip_request
if (!dialog ) {
CU_ASSERT_STRING_EQUAL_FATAL("INVITE",method);
dialog=belle_sip_provider_create_dialog(prov,BELLE_SIP_TRANSACTION(server_transaction));
callee_dialog=dialog;
inserv_transaction=server_transaction;
}
if (belle_sip_dialog_get_state(dialog) == BELLE_SIP_DIALOG_NULL) {
......@@ -167,9 +168,9 @@ static void caller_process_response_event(void *user_ctx, const belle_sip_respon
CU_ASSERT_PTR_NOT_NULL_FATAL(client_transaction);
belle_sip_dialog_t* dialog = belle_sip_transaction_get_dialog(BELLE_SIP_TRANSACTION(client_transaction));
CU_ASSERT_PTR_NOT_NULL_FATAL(dialog);
CU_ASSERT_PTR_EQUAL(caller_dialog,dialog);
if (belle_sip_dialog_get_state(dialog) == BELLE_SIP_DIALOG_NULL) {
CU_ASSERT_EQUAL(status,100);
callee_dialog=dialog;
} else if (belle_sip_dialog_get_state(dialog) == BELLE_SIP_DIALOG_EARLY){
CU_ASSERT_EQUAL(status,180);
/*send 200ok from callee*/
......
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