summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2005-10-23 21:01:33 +0000
committerHenri Herscher <henri@oreka.org>2005-10-23 21:01:33 +0000
commit85af6bf16e76eed354807c8943829bdd98383444 (patch)
treebc6f0744a5aa0ecc63188fc1756971b6e6292532
parenta3a0c8cce50bcf1db629c344fa7354b73fab6ba4 (diff)
Fixed crash when network device identifier in config file was invalid
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@6 09dcff7a-b715-0410-9601-b79a96267cd0
-rw-r--r--orkaudio/audiocaptureplugins/voip/VoIp.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/VoIp.cpp b/orkaudio/audiocaptureplugins/voip/VoIp.cpp
index e7a3b6d..a5325b8 100644
--- a/orkaudio/audiocaptureplugins/voip/VoIp.cpp
+++ b/orkaudio/audiocaptureplugins/voip/VoIp.cpp
@@ -429,8 +429,15 @@ void VoIp::Initialize()
void VoIp::Run()
{
- LOG4CXX_INFO(s_log, "Running VoIp.dll");
- pcap_loop(m_pcapHandle, 0, HandlePacket, NULL);
+ if(m_pcapHandle)
+ {
+ LOG4CXX_INFO(s_log, "Running VoIp.dll");
+ pcap_loop(m_pcapHandle, 0, HandlePacket, NULL);
+ }
+ else
+ {
+ LOG4CXX_INFO(s_log, "No network device opened - VoIp.dll not starting");
+ }
}
void VoIp::StartCapture(CStdString& port)