diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-04-18 17:49:05 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-04-18 17:49:05 +0000 |
commit | 2e9a84840853e5e3b94f1ef0158f58abc7b1455e (patch) | |
tree | b44869c50b1541897f5358e882dd6b94cee53e9d /protocols | |
parent | 32aa210a2cb1781833dd505e8e1267a5b3cd6f03 (diff) |
Tox: fixed call hungup
git-svn-id: http://svn.miranda-ng.org/main/trunk@12918 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Tox/src/tox_multimedia.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/protocols/Tox/src/tox_multimedia.cpp b/protocols/Tox/src/tox_multimedia.cpp index 72c746cd27..bc33108e5a 100644 --- a/protocols/Tox/src/tox_multimedia.cpp +++ b/protocols/Tox/src/tox_multimedia.cpp @@ -323,7 +323,7 @@ void CToxOutgoingAudioCall::OnCancel(CCtrlBase*) if (!isCallStarted)
toxav_cancel(m_proto->toxAv, m_proto->calls[hContact], 0, NULL);
else
- toxav_stop_call(m_proto->toxAv, m_proto->calls[hContact]);
+ toxav_hangup(m_proto->toxAv, m_proto->calls[hContact]);
}
INT_PTR CToxProto::OnSendAudioCall(WPARAM hContact, LPARAM)
@@ -403,7 +403,7 @@ void CToxProto::OnAvStart(void*, int32_t callId, void *arg) if (friendNumber == TOX_ERROR)
{
proto->debugLogA(__FUNCTION__": failed to get friend number");
- toxav_stop_call(proto->toxAv, callId);
+ toxav_hangup(proto->toxAv, callId);
return;
}
@@ -411,7 +411,7 @@ void CToxProto::OnAvStart(void*, int32_t callId, void *arg) if (hContact == NULL)
{
proto->debugLogA(__FUNCTION__": failed to find contact");
- toxav_stop_call(proto->toxAv, callId);
+ toxav_hangup(proto->toxAv, callId);
return;
}
@@ -428,7 +428,7 @@ void CToxProto::OnAvStart(void*, int32_t callId, void *arg) if (toxav_prepare_transmission(proto->toxAv, callId, false) == TOX_ERROR)
{
proto->debugLogA(__FUNCTION__": failed to prepare audio transmition");
- toxav_stop_call(proto->toxAv, callId);
+ toxav_hangup(proto->toxAv, callId);
return;
}
}
@@ -437,11 +437,12 @@ void CToxProto::OnAvEnd(void*, int32_t callId, void *arg) {
CToxProto *proto = (CToxProto*)arg;
+ toxav_kill_transmission(proto->toxAv, callId);
+
int friendNumber = toxav_get_peer_id(proto->toxAv, callId, 0);
if (friendNumber == TOX_ERROR)
{
proto->debugLogA(__FUNCTION__": failed to get friend number");
- toxav_stop_call(proto->toxAv, callId);
return;
}
@@ -449,7 +450,6 @@ void CToxProto::OnAvEnd(void*, int32_t callId, void *arg) if (hContact == NULL)
{
proto->debugLogA(__FUNCTION__": failed to find contact");
- toxav_stop_call(proto->toxAv, callId);
return;
}
@@ -460,8 +460,6 @@ void CToxProto::OnAvEnd(void*, int32_t callId, void *arg) db_event_add(hContact, &dbei);
WindowList_Broadcast(proto->hAudioDialogs, WM_AUDIO_END, hContact, 0);
-
- toxav_kill_transmission(proto->toxAv, callId);
}
void CToxProto::OnAvPeerTimeout(void*, int32_t callId, void *arg)
|