From 900d72f9511790add88313f31b17d6ca8d81a49c Mon Sep 17 00:00:00 2001 From: irungentoo Date: Sun, 21 Sep 2014 15:15:35 -0400 Subject: Fixed test. --- auto_tests/toxav_many_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/auto_tests/toxav_many_test.c b/auto_tests/toxav_many_test.c index d9c588f7..4ed79e22 100644 --- a/auto_tests/toxav_many_test.c +++ b/auto_tests/toxav_many_test.c @@ -159,8 +159,6 @@ void *in_thread_call (void *arg) int step = 0; int call_idx; - call_running[this_call->idx] = 1; - const int frame_size = (av_DefaultSettings.audio_sample_rate * av_DefaultSettings.audio_frame_duration / 1000); int16_t sample_payload[frame_size]; randombytes((uint8_t *)sample_payload, sizeof(int16_t) * frame_size); @@ -333,8 +331,10 @@ void test_AV_three_calls() pthread_mutex_init(&muhmutex, NULL); - for ( i = 0; i < 3; i++ ) + for ( i = 0; i < 3; i++ ) { + call_running[i] = 1; pthread_create(&status_control.calls[i].tid, NULL, in_thread_call, &status_control.calls[i]); + } /* Now start 3 calls and they'll run for 10 s */ -- cgit v1.2.3