diff options
Diffstat (limited to 'netcon/NetconService.hpp')
| -rw-r--r-- | netcon/NetconService.hpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/netcon/NetconService.hpp b/netcon/NetconService.hpp index 451d10cb..5ff575dc 100644 --- a/netcon/NetconService.hpp +++ b/netcon/NetconService.hpp @@ -66,6 +66,7 @@ namespace ZeroTier { class NetconConnection { public: + int perceived_fd; int their_fd; unsigned char buf[DEFAULT_READ_BUFFER_SIZE]; int idx; @@ -113,7 +114,7 @@ namespace ZeroTier { NetconConnection *getConnectionByTheirFD(int fd) { for(size_t i=0; i<connections.size(); i++) { - if(connections[i]->their_fd == fd) return connections[i]; + if(connections[i]->perceived_fd == fd) return connections[i]; } return NULL; } @@ -134,14 +135,6 @@ namespace ZeroTier { } return NULL; } - - void removeConnection(PhySocket *sock) - { - for(size_t i=0; i<connections.size(); i++) { - if(connections[i]->sock == sock) - connections.erase(connections.begin() + i); - } - } }; } // namespace ZeroTier |
