diff options
Diffstat (limited to 'toxav')
-rw-r--r-- | toxav/msi.c | 18 | ||||
-rw-r--r-- | toxav/toxav.h | 3 |
2 files changed, 11 insertions, 10 deletions
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 | |||
1675 | int msi_reject ( MSISession *session, int32_t call_index, const char *reason ) | 1675 | int 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); | |||
288 | int toxav_prepare_transmission(ToxAv *av, int32_t call_index, ToxAvCodecSettings *codec_settings, int support_video); | 288 | int 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 | |||
299 | int toxav_kill_transmission(ToxAv *av, int32_t call_index); | 298 | int 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. |