summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-08-19 18:01:43 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-08-19 18:01:43 +0300
commitdf0928b64c9b32e5c2becf657055d905869eb207 (patch)
treef157ca6300d69ae8e6264633cb79ea5fd03fd51b /protocols/JabberG
parent43d590fffd0de4750e75189e5d38b37374f9c459 (diff)
fixes #3165 (VoiceService: падение при входящем вызове)
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/src/jabber_proto.h2
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp2
-rw-r--r--protocols/JabberG/src/jabber_voip.cpp5
3 files changed, 6 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h
index 2e5272c4e8..dfd9fb9dcd 100644
--- a/protocols/JabberG/src/jabber_proto.h
+++ b/protocols/JabberG/src/jabber_proto.h
@@ -895,7 +895,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface
//---- jabber_voip.c -----------------------------------------------------------------
- bool OnICECandidate(const TiXmlElement *Node, const char *from);
+ bool OnICECandidate(const TiXmlElement *Node);
bool OnRTPDescription(const TiXmlElement *Node);
bool VOIPCreatePipeline();
bool VOIPTerminateSession(const char *reason = "cancel");
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 7870c6f7ba..f64651169d 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -1869,7 +1869,7 @@ bool CJabberProto::OnProcessJingle(const TiXmlElement *node)
if (m_bEnableVOIP && m_voipSession == szSid && transport) {
m_ThreadInfo->send(XmlNodeIq("result", idStr, from));
if (const TiXmlElement *candidate = XmlFirstChild(transport, "candidate")) {
- OnICECandidate(candidate, from);
+ OnICECandidate(candidate);
return true;
}
}
diff --git a/protocols/JabberG/src/jabber_voip.cpp b/protocols/JabberG/src/jabber_voip.cpp
index 5a12a22ec9..aefd9b20a9 100644
--- a/protocols/JabberG/src/jabber_voip.cpp
+++ b/protocols/JabberG/src/jabber_voip.cpp
@@ -439,8 +439,11 @@ bool CJabberProto::OnRTPDescription(const TiXmlElement *jingleNode)
return true;
}
-bool CJabberProto::OnICECandidate(const TiXmlElement *Node, const char *)
+bool CJabberProto::OnICECandidate(const TiXmlElement *Node)
{
+ if (!m_bEnableVOIP)
+ return false;
+
CMStringA scandidate;
CMStringA proto(XmlGetAttr(Node, "protocol"));
proto.MakeUpper();