summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2009-01-27 19:40:46 +0000
committerHenri Herscher <henri@oreka.org>2009-01-27 19:40:46 +0000
commit92bfba79b009bc1278edc1d4685d05c2f9fcb581 (patch)
tree7112cfd893397a9f71cade750882bc2e9b9b969a
parent46f5e77c7a1a2e00400279e2a54e5f21b788e56f (diff)
Now logging pcap error message even if success. It seems there might be some useful info in there in some cases.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@601 09dcff7a-b715-0410-9601-b79a96267cd0
-rw-r--r--orkaudio/audiocaptureplugins/voip/VoIp.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/VoIp.cpp b/orkaudio/audiocaptureplugins/voip/VoIp.cpp
index ce1a230..d50a039 100644
--- a/orkaudio/audiocaptureplugins/voip/VoIp.cpp
+++ b/orkaudio/audiocaptureplugins/voip/VoIp.cpp
@@ -3046,6 +3046,10 @@ pcap_t* VoIp::OpenDevice(CStdString& name)
if(m_pcapHandle)
{
error = ApplyPcapFilter();
+ if(error == NULL)
+ {
+ error = errorBuf;
+ }
}
if(m_pcapHandle == NULL)
{
@@ -3053,7 +3057,7 @@ pcap_t* VoIp::OpenDevice(CStdString& name)
}
else
{
- logMsg.Format("Successfully opened device. pcap handle:%x", m_pcapHandle);
+ logMsg.Format("Successfully opened device. pcap handle:%x message:%s", m_pcapHandle, error);
LOG4CXX_INFO(s_packetLog, logMsg);
SetPcapSocketBufferSize(m_pcapHandle);
}
@@ -3113,6 +3117,10 @@ void VoIp::OpenDevices()
if(m_pcapHandle)
{
error = ApplyPcapFilter();
+ if(error == NULL)
+ {
+ error = errorBuf;
+ }
}
if(m_pcapHandle == NULL)
{
@@ -3123,7 +3131,7 @@ void VoIp::OpenDevices()
CStdString logMsg, deviceName;
deviceName = device->name;
- logMsg.Format("Successfully opened device. pcap handle:%x", m_pcapHandle);
+ logMsg.Format("Successfully opened device. pcap handle:%x message:%s", m_pcapHandle, error);
LOG4CXX_INFO(s_packetLog, logMsg);
SetPcapSocketBufferSize(m_pcapHandle);
@@ -3147,6 +3155,10 @@ void VoIp::OpenDevices()
if(m_pcapHandle)
{
error = ApplyPcapFilter();
+ if(error == NULL)
+ {
+ error = errorBuf;
+ }
}
if(m_pcapHandle == NULL)
{
@@ -3157,7 +3169,7 @@ void VoIp::OpenDevices()
{
CStdString deviceName;
- logMsg.Format("Successfully opened default device:%s pcap handle:%x", defaultDevice->name, m_pcapHandle);
+ logMsg.Format("Successfully opened default device:%s pcap handle:%x message:%s", defaultDevice->name, m_pcapHandle, error);
LOG4CXX_INFO(s_packetLog, logMsg);
SetPcapSocketBufferSize(m_pcapHandle);