Commit e316b02b authored by jehan's avatar jehan

answer 481 in case of CANCEL received for an establshed dialog

parent 5fb5c55e
......@@ -475,6 +475,11 @@ static void process_request_event(void *op_base, const belle_sip_request_event_t
} else if (strcmp("OPTIONS",belle_sip_request_get_method(req))==0) {
resp=sal_op_create_response_from_request(op,req,200);
belle_sip_server_transaction_send_response(server_transaction,resp);
} else if (strcmp("CANCEL",belle_sip_request_get_method(req))==0) {
/*call leg does not exist because 200ok already sent*/
belle_sip_server_transaction_send_response( server_transaction
,sal_op_create_response_from_request(op,req,481));
} else{
ms_error("unexpected method [%s] for dialog [%p]",belle_sip_request_get_method(req),op->dialog);
unsupported_method(server_transaction,req);
......
......@@ -235,8 +235,8 @@ static void call_with_presence(void) {
CU_ASSERT_TRUE(subscribe_to_callee_presence(pauline,marie));
CU_ASSERT_TRUE(call(marie,pauline));
CU_ASSERT_EQUAL(marie->stat.number_of_LinphonePresenceActivityOnThePhone,1);
CU_ASSERT_EQUAL(pauline->stat.number_of_LinphonePresenceActivityOnThePhone,1);
CU_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphonePresenceActivityOnThePhone,1));
CU_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphonePresenceActivityOnThePhone,1));
reset_counters(&marie->stat);
reset_counters(&pauline->stat);
......
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