summaryrefslogtreecommitdiff
path: root/node/Peer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/Peer.cpp')
-rw-r--r--node/Peer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp
index 3aeb821e..c0cdaf17 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -162,12 +162,16 @@ Path::Type Peer::send(const RuntimeEnvironment *_r,const void *data,unsigned int
} else { // we only have a normal path (or none at all, that case is caught below)
bestPath = bestNormalPath;
}
+ if (!bestPath)
+ return Path::PATH_TYPE_NULL;
- if ((bestPath)&&(_r->sm->send(bestPath->address(),bestPath->tcp(),bestPath->type() == Path::PATH_TYPE_TCP_OUT,data,len))) {
+ _r->antiRec->logOutgoingZT(data,len);
+
+ if (_r->sm->send(bestPath->address(),bestPath->tcp(),bestPath->type() == Path::PATH_TYPE_TCP_OUT,data,len)) {
bestPath->sent(now);
- _r->antiRec->logOutgoingZT(data,len);
return bestPath->type();
}
+
return Path::PATH_TYPE_NULL;
}