Commit 697a6d4a authored by Guillaume BIENKOWSKI's avatar Guillaume BIENKOWSKI
Browse files

Fix the soundcard hint so that it trigger only when _all_ calls are paused or...

Fix the soundcard hint so that it trigger only when _all_ calls are paused or pausing (instead of just one call suffice). Also increase the test delay.
parent 3e56dcac
......@@ -6438,20 +6438,20 @@ static void notify_soundcard_usage(LinphoneCore *lc, bool_t used){
void linphone_core_soundcard_hint_check( LinphoneCore* lc){
MSList* the_calls = lc->calls;
LinphoneCall* call = NULL;
bool_t remaining_paused = FALSE;
bool_t dont_need_sound = TRUE;
/* check if the remaining calls are paused */
while( the_calls ){
call = the_calls->data;
if( call->state == LinphoneCallPausing || call->state == LinphoneCallPaused ){
remaining_paused = TRUE;
if( call->state != LinphoneCallPausing && call->state != LinphoneCallPaused ){
dont_need_sound = FALSE;
break;
}
the_calls = the_calls->next;
}
/* if no more calls or all calls are paused, we can free the soundcard */
if ( (lc->calls==NULL || remaining_paused) && !lc->use_files){
if ( (lc->calls==NULL || dont_need_sound) && !lc->use_files){
ms_message("Notifying soundcard that we don't need it anymore for calls.");
notify_soundcard_usage(lc,FALSE);
}
......
......@@ -2581,8 +2581,8 @@ static void call_transfer_existing_call_outgoing_call(void) {
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallRefered,1,2000));
/*pauline pausing marie*/
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallPausing,1,2000));
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallPaused,1,2000));
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallPausing,1,4000));
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallPaused,1,4000));
/*pauline calling laure*/
CU_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneCallOutgoingProgress,1,2000));
CU_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneTransferCallOutgoingInit,1,2000));
......
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