bug fixes

pull/179/head
despair 6 years ago committed by Rick
parent 43afede986
commit b3e8099838
No known key found for this signature in database
GPG Key ID: C0EDC8723FDC3465

@ -210,9 +210,7 @@ namespace llarp
flush_write()
{
if(t->before_write)
{
t->before_write(t);
}
ev_io::flush_write();
}

@ -371,7 +371,10 @@ struct llarp_win32_loop : public llarp_ev_loop
return upollfd && (tun_event_queue != INVALID_HANDLE_VALUE);
}
// Service paths first, then virtual interface
// OK, the event loop, as it exists now, will _only_
// work on sockets (and not very efficiently at that).
// This will NOT work on device files like /dev/tun
// on Windows
int
tick(int ms)
{

@ -36,10 +36,8 @@ namespace llarp
#endif
tunif.user = this;
tunif.netmask = DefaultTunNetmask;
#ifdef _WIN32
llarp::Zero(tunif.ifaddr, sizeof(tunif.ifaddr));
llarp::Zero(tunif.ifname, sizeof(tunif.ifname));
#else
// eh this shouldn't do anything on windows anyway
strncpy(tunif.ifaddr, DefaultTunSrcAddr, sizeof(tunif.ifaddr) - 1);
strncpy(tunif.ifname, DefaultTunIfname, sizeof(tunif.ifname) - 1);
#endif

@ -28,6 +28,13 @@
#include <fcntl.h>
#include <sys/stat.h>
// this is probably big enough to get
// the lesser of 4096 sockets or whatever
// the system allows
#ifndef FD_SETSIZE
#define FD_SETSIZE 4096
#endif
#include <io.h>
#include <winsock2.h>
#include <ws2tcpip.h>

Loading…
Cancel
Save