From 16c47f7b01ccda9517daa7ea0daf41687faa5d3c Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 4 Jun 2014 16:40:10 +0200 Subject: [PATCH] fix linphone_core_update_call() --- coreapi/linphonecore.c | 8 +++++++- tester/register_tester.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 468481b42..6c79d7c71 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -3148,7 +3148,13 @@ int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const Linpho bool_t has_video = FALSE; #endif - if (call->state!=LinphoneCallStreamsRunning){ + switch(call->state){ + case LinphoneCallIncomingEarlyMedia: + case LinphoneCallIncomingReceived: + case LinphoneCallStreamsRunning: + /*these states are allowed for linphone_core_update_call()*/ + break; + default: ms_error("linphone_core_update_call() is not allowed in [%s] state",linphone_call_state_to_string(call->state)); return -1; } diff --git a/tester/register_tester.c b/tester/register_tester.c index 15584fc6f..2e7d330ff 100644 --- a/tester/register_tester.c +++ b/tester/register_tester.c @@ -681,7 +681,7 @@ static void io_recv_error_late_recovery(){ CU_ASSERT_TRUE(wait_for(lc,NULL,&counters->number_of_LinphoneRegistrationProgress,(register_ok-number_of_udp_proxy)+register_ok /*because 1 udp*/)); CU_ASSERT_EQUAL(counters->number_of_LinphoneRegistrationFailed,0) - CU_ASSERT_TRUE(wait_for_list(lcs=ms_list_append(NULL,lc),&counters->number_of_LinphoneRegistrationFailed,(register_ok-number_of_udp_proxy),sal_get_refresher_retry_after(lc->sal)+1000)); + CU_ASSERT_TRUE(wait_for_list(lcs=ms_list_append(NULL,lc),&counters->number_of_LinphoneRegistrationFailed,(register_ok-number_of_udp_proxy),sal_get_refresher_retry_after(lc->sal)+3000)); sal_set_recv_error(lc->sal, 1); /*reset*/ sal_set_send_error(lc->sal, 0);