From 9c1c84d2a402fc295bb64911628e12d4a57f313f Mon Sep 17 00:00:00 2001 From: Rick V <35446253+despair86@users.noreply.github.com> Date: Fri, 17 May 2019 02:52:30 -0500 Subject: [PATCH 1/4] really remove line break --- motto.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/motto.txt b/motto.txt index 295ca516b..2465be8c8 100644 --- a/motto.txt +++ b/motto.txt @@ -1 +1 @@ -shit's on fire yo +shit's on fire yo \ No newline at end of file From 4815e0d04c9447dbc26fdb8e5cbca126993fb3a7 Mon Sep 17 00:00:00 2001 From: Rick V Date: Mon, 6 May 2019 07:17:34 -0500 Subject: [PATCH 2/4] move tun autoconfig from config parser to tun setup refactor/combine common code DRY (cherry picked from commit 2e44d29d4a93aa22d99d62b457071b14516b83ac) --- llarp/ev/ev.cpp | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/llarp/ev/ev.cpp b/llarp/ev/ev.cpp index ecfca6236..6d31a2d17 100644 --- a/llarp/ev/ev.cpp +++ b/llarp/ev/ev.cpp @@ -121,9 +121,7 @@ llarp_ev_udp_sendto(struct llarp_udp_io *udp, const sockaddr *to, return ret; } -#ifndef _WIN32 #include - bool llarp_ev_add_tun(struct llarp_ev_loop *loop, struct llarp_tun_io *tun) { @@ -166,24 +164,14 @@ llarp_ev_add_tun(struct llarp_ev_loop *loop, struct llarp_tun_io *tun) llarp::LogDebug("IfAddr: ", tun->ifaddr); llarp::LogDebug("IfName: ", tun->ifname); llarp::LogDebug("IfNMsk: ", tun->netmask); +#ifndef _WIN32 auto dev = loop->create_tun(tun); tun->impl = dev; if(dev) { return loop->add_ev(dev, false); } - llarp::LogWarn("Loop could not create tun"); - return false; -} #else -// OK, now it's time to do it my way. -// we're not even going to use the existing llarp::tun -// we still use the llarp_tun_io struct -// since we still need to branch to the -// packet processing functions -bool -llarp_ev_add_tun(llarp_ev_loop *loop, llarp_tun_io *tun) -{ UNREFERENCED_PARAMETER(loop); auto dev = new win32_tun_io(tun); tun->impl = dev; @@ -193,11 +181,11 @@ llarp_ev_add_tun(llarp_ev_loop *loop, llarp_tun_io *tun) dev->setup(); return dev->add_ev(); // start up tun and add to event queue } +#endif + llarp::LogWarn("Loop could not create tun"); return false; } -#endif -#ifndef _WIN32 bool llarp_ev_tun_async_write(struct llarp_tun_io *tun, const llarp_buffer_t &buf) { @@ -206,21 +194,13 @@ llarp_ev_tun_async_write(struct llarp_tun_io *tun, const llarp_buffer_t &buf) llarp::LogWarn("packet too big, ", buf.sz, " > ", EV_WRITE_BUF_SZ); return false; } +#ifndef _WIN32 return static_cast< llarp::tun * >(tun->impl)->queue_write(buf.base, buf.sz); -} #else -bool -llarp_ev_tun_async_write(struct llarp_tun_io *tun, const llarp_buffer_t &buf) -{ - if(buf.sz > EV_WRITE_BUF_SZ) - { - llarp::LogWarn("packet too big, ", buf.sz, " > ", EV_WRITE_BUF_SZ); - return false; - } return static_cast< win32_tun_io * >(tun->impl)->queue_write(buf.base, buf.sz); -} #endif +} bool llarp_tcp_conn_async_write(struct llarp_tcp_conn *conn, const llarp_buffer_t &b) From 538696a387bb1f9ae358c92310864e7a866744f4 Mon Sep 17 00:00:00 2001 From: Rick V Date: Fri, 17 May 2019 03:24:27 -0500 Subject: [PATCH 3/4] fix ui --- motto.txt | 2 +- ui-win32/versioning/release.bat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/motto.txt b/motto.txt index 2465be8c8..295ca516b 100644 --- a/motto.txt +++ b/motto.txt @@ -1 +1 @@ -shit's on fire yo \ No newline at end of file +shit's on fire yo diff --git a/ui-win32/versioning/release.bat b/ui-win32/versioning/release.bat index 62cd910a3..6a5eb7569 100644 --- a/ui-win32/versioning/release.bat +++ b/ui-win32/versioning/release.bat @@ -1,4 +1,4 @@ REM this requires some kind of cygwin toolset in $PATH REM or just having sed(1) at a minimum set /P RELEASE_NAME=<..\..\..\motto.txt -sed -i 's/RELEASE_CODENAME/%RELEASE_NAME%/g' ..\..\Properties\AssemblyInfo.cs \ No newline at end of file +sed -i "s/RELEASE_CODENAME/%RELEASE_NAME%/g" ..\..\Properties\AssemblyInfo.cs \ No newline at end of file From 7847094707f7c96ffc17bf7dab04e856bdb92b51 Mon Sep 17 00:00:00 2001 From: Rick V Date: Fri, 17 May 2019 03:27:25 -0500 Subject: [PATCH 4/4] fix UI again --- ui-win32/versioning/unpatch.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-win32/versioning/unpatch.bat b/ui-win32/versioning/unpatch.bat index ae645209b..494cb7262 100644 --- a/ui-win32/versioning/unpatch.bat +++ b/ui-win32/versioning/unpatch.bat @@ -1,4 +1,4 @@ REM this requires some kind of cygwin toolset in $PATH REM or just having sed(1) at a minimum set /P RELEASE_NAME=<..\..\..\motto.txt -sed -i 's/%RELEASE_NAME%/RELEASE_CODENAME/g' ..\..\Properties\AssemblyInfo.cs \ No newline at end of file +sed -i "s/%RELEASE_NAME%/RELEASE_CODENAME/g" ..\..\Properties\AssemblyInfo.cs \ No newline at end of file