summaryrefslogtreecommitdiff
path: root/src/anytun.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2009-02-20 14:56:34 +0000
committerOthmar Gsenger <otti@anytun.org>2009-02-20 14:56:34 +0000
commit0aa919f7f583e2b518dfbe096721db7fb199508f (patch)
treedb606485f2ff95e654abeef2b128546aea0ff0ea /src/anytun.cpp
parentwindows service works now (diff)
added some log messages
Diffstat (limited to 'src/anytun.cpp')
-rw-r--r--src/anytun.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp
index fc7404c..dbcedb6 100644
--- a/src/anytun.cpp
+++ b/src/anytun.cpp
@@ -212,7 +212,9 @@ void sender(void* p)
try {
param->src.send(encrypted_packet.getBuf(), encrypted_packet.getLength(), conn.remote_end_);
- } catch (std::exception& e) { } // ignoring icmp port unreachable :) and other socket errors :(
+ } catch (std::exception& e) {
+ cLog.msg(Log::PRIO_ERR) << "could not send data: " << e.what();
+ }
}
}
catch(std::runtime_error& e) {
@@ -246,8 +248,10 @@ void receiver(void* p)
int len;
try {
len = param->src.recv(encrypted_packet.getBuf(), encrypted_packet.getLength(), remote_end);
- } catch (std::exception& e) { continue; }
- // ignoring icmp port unreachable :) and other socket errors :(
+ } catch (std::exception& e) {
+ cLog.msg(Log::PRIO_ERR) << "could not recive packet "<< e.what();
+ continue;
+ }
if(len < 0)
continue; // silently ignore socket recv errors, this is probably no good idea...