summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormannol <eniz_vukovic@hotmail.com>2014-07-21 22:11:59 +0200
committermannol <eniz_vukovic@hotmail.com>2014-07-21 22:11:59 +0200
commit0cf9f27b70a612174ef16fad86f167017c7fc061 (patch)
treed4d98877ee9f9ca910a655a1fc2ad17e12843d86
parent79115259a81dc958041f18573f34299c083cebea (diff)
This should fix test failing
-rw-r--r--auto_tests/toxav_basic_test.c2
-rw-r--r--toxav/msi.c18
-rw-r--r--toxav/toxav.h3
-rw-r--r--toxcore/logger.h1
4 files changed, 12 insertions, 12 deletions
diff --git a/auto_tests/toxav_basic_test.c b/auto_tests/toxav_basic_test.c
index 1361edd3..0dc330e0 100644
--- a/auto_tests/toxav_basic_test.c
+++ b/auto_tests/toxav_basic_test.c
@@ -140,7 +140,7 @@ void callback_call_type_change ( void *av, int32_t call_index, void *_arg )
140void callback_requ_timeout ( void *av, int32_t call_index, void *_arg ) 140void callback_requ_timeout ( void *av, int32_t call_index, void *_arg )
141{ 141{
142 Status *cast = _arg; 142 Status *cast = _arg;
143 printf("Call timed-out!"); 143 printf("Call timed-out!\n");
144 cast->Alice.status = TimedOut; 144 cast->Alice.status = TimedOut;
145} 145}
146 146
diff --git a/toxav/msi.c b/toxav/msi.c
index 5140a10a..7dc12d4d 100644
--- a/toxav/msi.c
+++ b/toxav/msi.c
@@ -1645,9 +1645,11 @@ int msi_cancel ( MSISession *session, int32_t call_index, uint32_t peer, const c
1645 1645
1646 MSIMessage *msg_cancel = msi_new_message ( TypeRequest, cancel ); 1646 MSIMessage *msg_cancel = msi_new_message ( TypeRequest, cancel );
1647 1647
1648#if 0 1648 /* FIXME */
1649#if 0
1649 if ( reason && strlen(reason) < sizeof(MSIReasonStrType) ) { 1650 if ( reason && strlen(reason) < sizeof(MSIReasonStrType) ) {
1650 MSIReasonStrType reason_cast = {0}; 1651 MSIReasonStrType reason_cast;
1652 memset(reason_cast, '\0', sizeof(MSIReasonStrType));
1651 memcpy(reason_cast, reason, strlen(reason)); 1653 memcpy(reason_cast, reason, strlen(reason));
1652 msi_msg_set_reason(msg_cancel, reason_cast); 1654 msi_msg_set_reason(msg_cancel, reason_cast);
1653 } 1655 }
@@ -1656,8 +1658,6 @@ int msi_cancel ( MSISession *session, int32_t call_index, uint32_t peer, const c
1656 send_message ( session, session->calls[call_index], msg_cancel, peer ); 1658 send_message ( session, session->calls[call_index], msg_cancel, peer );
1657 free ( msg_cancel ); 1659 free ( msg_cancel );
1658 1660
1659 /*session->calls[call_index]->state = call_hanged_up;
1660 session->calls[call_index]->request_timer_id = timer_alloc ( handle_timeout, session, call_index, m_deftout );*/
1661 terminate_call ( session, session->calls[call_index] ); 1661 terminate_call ( session, session->calls[call_index] );
1662 pthread_mutex_unlock(&session->mutex); 1662 pthread_mutex_unlock(&session->mutex);
1663 1663
@@ -1675,7 +1675,7 @@ int msi_cancel ( MSISession *session, int32_t call_index, uint32_t peer, const c
1675int msi_reject ( MSISession *session, int32_t call_index, const char *reason ) 1675int msi_reject ( MSISession *session, int32_t call_index, const char *reason )
1676{ 1676{
1677 pthread_mutex_lock(&session->mutex); 1677 pthread_mutex_lock(&session->mutex);
1678 LOGGER_DEBUG("Session: %p Rejecting call: %u; reason:", session, call_index, reason ? (char *)reason : "Unknown"); 1678 LOGGER_DEBUG("Session: %p Rejecting call: %u; reason: %s", session, call_index, reason ? reason : "Unknown");
1679 1679
1680 if ( call_index < 0 || call_index >= session->max_calls || !session->calls[call_index] ) { 1680 if ( call_index < 0 || call_index >= session->max_calls || !session->calls[call_index] ) {
1681 LOGGER_ERROR("Invalid call index!"); 1681 LOGGER_ERROR("Invalid call index!");
@@ -1685,11 +1685,15 @@ int msi_reject ( MSISession *session, int32_t call_index, const char *reason )
1685 1685
1686 MSIMessage *msg_reject = msi_new_message ( TypeRequest, reject ); 1686 MSIMessage *msg_reject = msi_new_message ( TypeRequest, reject );
1687 1687
1688 if ( reason ) { 1688 /* FIXME */
1689 MSIReasonStrType reason_cast = {0}; 1689#if 0
1690 if ( reason && strlen(reason) < sizeof(MSIReasonStrType) ) {
1691 MSIReasonStrType reason_cast;
1692 memset(reason_cast, '\0', sizeof(MSIReasonStrType));
1690 memcpy(reason_cast, reason, strlen(reason)); 1693 memcpy(reason_cast, reason, strlen(reason));
1691 msi_msg_set_reason(msg_reject, reason_cast); 1694 msi_msg_set_reason(msg_reject, reason_cast);
1692 } 1695 }
1696#endif
1693 1697
1694 send_message ( session, session->calls[call_index], msg_reject, 1698 send_message ( session, session->calls[call_index], msg_reject,
1695 session->calls[call_index]->peers[session->calls[call_index]->peer_count - 1] ); 1699 session->calls[call_index]->peers[session->calls[call_index]->peer_count - 1] );
diff --git a/toxav/toxav.h b/toxav/toxav.h
index a10b343f..6df9d300 100644
--- a/toxav/toxav.h
+++ b/toxav/toxav.h
@@ -288,7 +288,6 @@ int toxav_stop_call(ToxAv *av, int32_t call_index);
288int toxav_prepare_transmission(ToxAv *av, int32_t call_index, ToxAvCodecSettings *codec_settings, int support_video); 288int toxav_prepare_transmission(ToxAv *av, int32_t call_index, ToxAvCodecSettings *codec_settings, int support_video);
289 289
290/** 290/**
291<<<<<<< HEAD
292 * @brief Call this at the end of the transmission. 291 * @brief Call this at the end of the transmission.
293 * 292 *
294 * @param av Handler. 293 * @param av Handler.
@@ -299,8 +298,6 @@ int toxav_prepare_transmission(ToxAv *av, int32_t call_index, ToxAvCodecSettings
299int toxav_kill_transmission(ToxAv *av, int32_t call_index); 298int toxav_kill_transmission(ToxAv *av, int32_t call_index);
300 299
301/** 300/**
302=======
303>>>>>>> upstream/master
304 * @brief Encode and send video packet. 301 * @brief Encode and send video packet.
305 * 302 *
306 * @param av Handler. 303 * @param av Handler.
diff --git a/toxcore/logger.h b/toxcore/logger.h
index dd04e059..d52df1b8 100644
--- a/toxcore/logger.h
+++ b/toxcore/logger.h
@@ -26,7 +26,6 @@
26#define __TOXLOGGER 26#define __TOXLOGGER
27 27
28#include <string.h> 28#include <string.h>
29// #define LOGGING
30 29
31#ifdef LOGGING 30#ifdef LOGGING
32 31