diff options
Diffstat (limited to 'protocols/JabberG/src/jabber_voip.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_voip.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_voip.cpp b/protocols/JabberG/src/jabber_voip.cpp index 5f80c1c364..fec95780de 100644 --- a/protocols/JabberG/src/jabber_voip.cpp +++ b/protocols/JabberG/src/jabber_voip.cpp @@ -276,6 +276,9 @@ void dbgprint(const gchar *string) bool CJabberProto::VOIPCreatePipeline(void) { + if (!m_bEnableVOIP) + return false; + //gstreamer init static bool gstinited = 0; if (!gstinited) { @@ -347,12 +350,11 @@ err: bool CJabberProto::VOIPTerminateSession() { - gst_print("Terminating session"); if (m_pipe1) { gst_element_set_state(GST_ELEMENT(m_pipe1), GST_STATE_NULL); g_clear_object(&m_pipe1); - gst_print("Pipeline stopped\n"); gst_object_unref(m_pipe1); + gst_print("Pipeline stopped\n"); } m_voipICEPwd.Empty(); @@ -457,12 +459,15 @@ bool CJabberProto::OnICECandidate(const TiXmlElement *Node, const char *) bool CJabberProto::VOIPCallIinitiate(MCONTACT hContact) { - if (m_voipSession != "") { + if (!m_voipSession.IsEmpty()) { VOIPTerminateSession(); MessageBoxA(0, "Terminated", NULL, 0); return 0; } + if (!m_bEnableVOIP) + return false; + CMStringA jid(ptrA(getUStringA(hContact, "jid"))); if (jid == "") return 0; |