summaryrefslogtreecommitdiff
path: root/toxav/toxav.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-07-04 13:28:47 -0400
committerirungentoo <irungentoo@gmail.com>2014-07-04 13:28:47 -0400
commit705fceb2e02e953f9bcb86b4177935326d65f6ae (patch)
tree8038bf5e4bf34bc19c7506f4b7c7007fccb7e9c6 /toxav/toxav.c
parent2a70d294403e7e8cd07e73a42e319d345a86f1e2 (diff)
parenta8fa360547ccefef3694c5d185414874539769c1 (diff)
Merge branch 'mannol1-master'
Diffstat (limited to 'toxav/toxav.c')
-rw-r--r--toxav/toxav.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c
index e98c9c4b..82385b95 100644
--- a/toxav/toxav.c
+++ b/toxav/toxav.c
@@ -795,8 +795,6 @@ int toxav_get_peer_transmission_type ( ToxAv *av, int32_t call_index, int peer )
795 */ 795 */
796int toxav_get_peer_id ( ToxAv *av, int32_t call_index, int peer ) 796int toxav_get_peer_id ( ToxAv *av, int32_t call_index, int peer )
797{ 797{
798 assert(av->msi_session);
799
800 if ( peer < 0 || cii(call_index, av->msi_session) || !av->msi_session->calls[call_index] 798 if ( peer < 0 || cii(call_index, av->msi_session) || !av->msi_session->calls[call_index]
801 || av->msi_session->calls[call_index]->peer_count <= peer ) 799 || av->msi_session->calls[call_index]->peer_count <= peer )
802 return ErrorInternal; 800 return ErrorInternal;
@@ -805,6 +803,23 @@ int toxav_get_peer_id ( ToxAv *av, int32_t call_index, int peer )
805} 803}
806 804
807/** 805/**
806 * @brief Get id of peer participating in conversation
807 *
808 * @param av Handler
809 * @param peer peer index
810 * @return int
811 * @retval ToxAvError No peer id
812 */
813ToxAvCallState toxav_get_call_state(ToxAv *av, int32_t call_index)
814{
815 if ( cii(call_index, av->msi_session) || !av->msi_session->calls[call_index] )
816 return av_CallNonExistant;
817
818 return av->msi_session->calls[call_index]->state;
819
820}
821
822/**
808 * @brief Is certain capability supported 823 * @brief Is certain capability supported
809 * 824 *
810 * @param av Handler 825 * @param av Handler