mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
This should fix test failing
This commit is contained in:
parent
79115259a8
commit
0cf9f27b70
|
@ -140,7 +140,7 @@ void callback_call_type_change ( void *av, int32_t call_index, void *_arg )
|
||||||
void callback_requ_timeout ( void *av, int32_t call_index, void *_arg )
|
void callback_requ_timeout ( void *av, int32_t call_index, void *_arg )
|
||||||
{
|
{
|
||||||
Status *cast = _arg;
|
Status *cast = _arg;
|
||||||
printf("Call timed-out!");
|
printf("Call timed-out!\n");
|
||||||
cast->Alice.status = TimedOut;
|
cast->Alice.status = TimedOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
18
toxav/msi.c
18
toxav/msi.c
|
@ -1645,9 +1645,11 @@ int msi_cancel ( MSISession *session, int32_t call_index, uint32_t peer, const c
|
||||||
|
|
||||||
MSIMessage *msg_cancel = msi_new_message ( TypeRequest, cancel );
|
MSIMessage *msg_cancel = msi_new_message ( TypeRequest, cancel );
|
||||||
|
|
||||||
#if 0
|
/* FIXME */
|
||||||
|
#if 0
|
||||||
if ( reason && strlen(reason) < sizeof(MSIReasonStrType) ) {
|
if ( reason && strlen(reason) < sizeof(MSIReasonStrType) ) {
|
||||||
MSIReasonStrType reason_cast = {0};
|
MSIReasonStrType reason_cast;
|
||||||
|
memset(reason_cast, '\0', sizeof(MSIReasonStrType));
|
||||||
memcpy(reason_cast, reason, strlen(reason));
|
memcpy(reason_cast, reason, strlen(reason));
|
||||||
msi_msg_set_reason(msg_cancel, reason_cast);
|
msi_msg_set_reason(msg_cancel, reason_cast);
|
||||||
}
|
}
|
||||||
|
@ -1656,8 +1658,6 @@ int msi_cancel ( MSISession *session, int32_t call_index, uint32_t peer, const c
|
||||||
send_message ( session, session->calls[call_index], msg_cancel, peer );
|
send_message ( session, session->calls[call_index], msg_cancel, peer );
|
||||||
free ( msg_cancel );
|
free ( msg_cancel );
|
||||||
|
|
||||||
/*session->calls[call_index]->state = call_hanged_up;
|
|
||||||
session->calls[call_index]->request_timer_id = timer_alloc ( handle_timeout, session, call_index, m_deftout );*/
|
|
||||||
terminate_call ( session, session->calls[call_index] );
|
terminate_call ( session, session->calls[call_index] );
|
||||||
pthread_mutex_unlock(&session->mutex);
|
pthread_mutex_unlock(&session->mutex);
|
||||||
|
|
||||||
|
@ -1675,7 +1675,7 @@ int msi_cancel ( MSISession *session, int32_t call_index, uint32_t peer, const c
|
||||||
int msi_reject ( MSISession *session, int32_t call_index, const char *reason )
|
int msi_reject ( MSISession *session, int32_t call_index, const char *reason )
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&session->mutex);
|
pthread_mutex_lock(&session->mutex);
|
||||||
LOGGER_DEBUG("Session: %p Rejecting call: %u; reason:", session, call_index, reason ? (char *)reason : "Unknown");
|
LOGGER_DEBUG("Session: %p Rejecting call: %u; reason: %s", session, call_index, reason ? reason : "Unknown");
|
||||||
|
|
||||||
if ( call_index < 0 || call_index >= session->max_calls || !session->calls[call_index] ) {
|
if ( call_index < 0 || call_index >= session->max_calls || !session->calls[call_index] ) {
|
||||||
LOGGER_ERROR("Invalid call index!");
|
LOGGER_ERROR("Invalid call index!");
|
||||||
|
@ -1685,11 +1685,15 @@ int msi_reject ( MSISession *session, int32_t call_index, const char *reason )
|
||||||
|
|
||||||
MSIMessage *msg_reject = msi_new_message ( TypeRequest, reject );
|
MSIMessage *msg_reject = msi_new_message ( TypeRequest, reject );
|
||||||
|
|
||||||
if ( reason ) {
|
/* FIXME */
|
||||||
MSIReasonStrType reason_cast = {0};
|
#if 0
|
||||||
|
if ( reason && strlen(reason) < sizeof(MSIReasonStrType) ) {
|
||||||
|
MSIReasonStrType reason_cast;
|
||||||
|
memset(reason_cast, '\0', sizeof(MSIReasonStrType));
|
||||||
memcpy(reason_cast, reason, strlen(reason));
|
memcpy(reason_cast, reason, strlen(reason));
|
||||||
msi_msg_set_reason(msg_reject, reason_cast);
|
msi_msg_set_reason(msg_reject, reason_cast);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
send_message ( session, session->calls[call_index], msg_reject,
|
send_message ( session, session->calls[call_index], msg_reject,
|
||||||
session->calls[call_index]->peers[session->calls[call_index]->peer_count - 1] );
|
session->calls[call_index]->peers[session->calls[call_index]->peer_count - 1] );
|
||||||
|
|
|
@ -288,7 +288,6 @@ int toxav_stop_call(ToxAv *av, int32_t call_index);
|
||||||
int toxav_prepare_transmission(ToxAv *av, int32_t call_index, ToxAvCodecSettings *codec_settings, int support_video);
|
int toxav_prepare_transmission(ToxAv *av, int32_t call_index, ToxAvCodecSettings *codec_settings, int support_video);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
<<<<<<< HEAD
|
|
||||||
* @brief Call this at the end of the transmission.
|
* @brief Call this at the end of the transmission.
|
||||||
*
|
*
|
||||||
* @param av Handler.
|
* @param av Handler.
|
||||||
|
@ -299,8 +298,6 @@ int toxav_prepare_transmission(ToxAv *av, int32_t call_index, ToxAvCodecSettings
|
||||||
int toxav_kill_transmission(ToxAv *av, int32_t call_index);
|
int toxav_kill_transmission(ToxAv *av, int32_t call_index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
=======
|
|
||||||
>>>>>>> upstream/master
|
|
||||||
* @brief Encode and send video packet.
|
* @brief Encode and send video packet.
|
||||||
*
|
*
|
||||||
* @param av Handler.
|
* @param av Handler.
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
#define __TOXLOGGER
|
#define __TOXLOGGER
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
// #define LOGGING
|
|
||||||
|
|
||||||
#ifdef LOGGING
|
#ifdef LOGGING
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user