various bug fixes

This commit is contained in:
Joseph Henry
2017-04-21 14:56:42 -07:00
parent 76abb3e0a2
commit 6a25abb757
16 changed files with 259 additions and 1312 deletions

View File

@@ -21,10 +21,13 @@
#include <sys/socket.h>
// picoTCP
#include "pico_socket.h"
// ZT
#include "Phy.hpp"
// SDK
#include "ZeroTierSDK.h"
#include "SocketTap.hpp"
@@ -59,6 +62,7 @@ namespace ZeroTier {
int state; // See ZeroTierSDK.h for (ZT_SOCK_STATE_*)
Connection() {
// DEBUG_INFO("Connection() this = %p", this);
ZT_PHY_SOCKFD_TYPE fdpair[2];
if(socketpair(PF_LOCAL, SOCK_STREAM, 0, fdpair) < 0) {
if(errno < 0) {
@@ -69,6 +73,10 @@ namespace ZeroTier {
sdk_fd = fdpair[0];
app_fd = fdpair[1];
}
~Connection()
{
// DEBUG_INFO("~Connection() this = %p", this);
}
};
/*