Fixed inconsistencies

This commit is contained in:
mannol 2015-05-07 23:14:03 +02:00
parent eb6e8aa290
commit 73fbc22961
6 changed files with 9 additions and 14 deletions

View File

@ -292,7 +292,7 @@ START_TEST(test_AV_flows)
}
}
while (AliceCC.state != TOXAV_CALL_STATE_END)
while (AliceCC.state != TOXAV_CALL_STATE_FINISHED)
iterate_tox(bootstrap, Alice, Bob);
printf("Success!\n");
@ -329,7 +329,7 @@ START_TEST(test_AV_flows)
}
/* Alice will not receive end state */
while (BobCC.state != TOXAV_CALL_STATE_END)
while (BobCC.state != TOXAV_CALL_STATE_FINISHED)
iterate_tox(bootstrap, Alice, Bob);
printf("Success!\n");

View File

@ -623,7 +623,7 @@ int main (int argc, char** argv)
}
iterate_tox(bootstrap, AliceAV, BobAV);
assert(BobCC.state == TOXAV_CALL_STATE_END);
assert(BobCC.state == TOXAV_CALL_STATE_FINISHED);
/* Stop decode thread */
data.sig = -1;
@ -717,7 +717,7 @@ int main (int argc, char** argv)
}
iterate_tox(bootstrap, AliceAV, BobAV);
assert(BobCC.state == TOXAV_CALL_STATE_END);
assert(BobCC.state == TOXAV_CALL_STATE_FINISHED);
/* Stop decode thread */
printf("Stopping decode thread\n");

View File

@ -285,7 +285,7 @@ int rtp_send_data ( RTPSession *session, const uint8_t *data, uint16_t length, b
return -1;
}
session->sequnum = session->sequnum >= MAX_SEQU_NUM ? 0 : session->sequnum + 1;
session->sequnum ++;
return 0;
}
void rtp_free_msg ( RTPMessage *msg )

View File

@ -38,7 +38,6 @@
/*LOGGER_DEBUG("Unlocked mutex: %p", mutex);*/\
} while(0)
#define MAX_SEQU_NUM 65535
#define MAX_RTP_SIZE 1500
/**

View File

@ -1034,7 +1034,7 @@ int callback_end(void* toxav_inst, MSICall* call)
ToxAV* toxav = toxav_inst;
pthread_mutex_lock(toxav->mutex);
invoke_call_state(toxav, call->friend_number, TOXAV_CALL_STATE_END);
invoke_call_state(toxav, call->friend_number, TOXAV_CALL_STATE_FINISHED);
call_kill_transmission(call->av_call);
call_remove(call->av_call);

View File

@ -191,11 +191,6 @@ bool toxav_answer(ToxAV *av, uint32_t friend_number, uint32_t audio_bit_rate, ui
*
******************************************************************************/
typedef enum TOXAV_CALL_STATE {
/**
* Not sending nor receiving anything, meaning, one of the sides requested pause.
* The call will be resumed once the side that initiated pause resumes it.
*/
TOXAV_CALL_STATE_PAUSED = 0,
/**
* The flag that marks that friend is sending audio.
*/
@ -214,9 +209,10 @@ typedef enum TOXAV_CALL_STATE {
TOXAV_CALL_STATE_RECEIVING_V = 8,
/**
* The call has finished. This is the final state after which no more state
* transitions can occur for the call.
* transitions can occur for the call. This call state will never be
* triggered in combination with other call states.
*/
TOXAV_CALL_STATE_END = 16,
TOXAV_CALL_STATE_FINISHED = 16,
/**
* Set by the AV core if an error occurred on the remote end. This call
* state will never be triggered in combination with other call states.