mirror of https://github.com/tp4a/teleport
fix assist memory leak. installer script works with NSIS 3.0.1.
parent
858b24f5c1
commit
b90d24e42d
|
@ -199,6 +199,8 @@ class Env(object):
|
|||
|
||||
def _get_nsis(self):
|
||||
p = self._winreg_read(winreg.HKEY_LOCAL_MACHINE, r'SOFTWARE\NSIS\Unicode', '')
|
||||
if p is None:
|
||||
p = self._winreg_read(winreg.HKEY_LOCAL_MACHINE, r'SOFTWARE\NSIS', '')
|
||||
return os.path.join(p[0], 'makensis.exe') if p is not None else None
|
||||
|
||||
def _winreg_read(self, base, path, key):
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
#include "resource.h"
|
||||
#include "dlg_main.h"
|
||||
#include "ts_http_rpc.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
# include <vld.h>
|
||||
#endif
|
||||
|
||||
#pragma comment(lib, "shlwapi.lib")
|
||||
|
||||
#define WMU_INSTANCE_EXIT (WM_USER + 2)
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>..\..\out\client\$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||
<IntDir>..\..\out\_tmp_\$(ProjectName)\$(PlatformTarget)\$(Configuration)\</IntDir>
|
||||
<IncludePath>D:\apps\vld\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\apps\vld\lib\Win32;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
|
|
|
@ -105,7 +105,7 @@ void http_rpc_main_loop(void)
|
|||
|
||||
g_http_interface.run();
|
||||
|
||||
EXLOGW("[prc] main loop end.\n");
|
||||
EXLOGW("[rpc] main loop end.\n");
|
||||
}
|
||||
|
||||
void http_rpc_stop(void)
|
||||
|
@ -188,7 +188,6 @@ bool TsHttpRpc::init(const char* ip, int port)
|
|||
else
|
||||
sprintf_s(addr, 128, "%s:%d", ip, port);
|
||||
|
||||
mg_mgr_init(&m_mg_mgr, NULL);
|
||||
nc = mg_bind(&m_mg_mgr, addr, _mg_event_handler);
|
||||
if (nc == NULL)
|
||||
{
|
||||
|
@ -250,7 +249,7 @@ void TsHttpRpc::_mg_event_handler(struct mg_connection *nc, int ev, void *ev_dat
|
|||
memcpy(&_uri[0], hm->uri.p, hm->uri.len);
|
||||
uri = &_uri[0];
|
||||
|
||||
#ifdef TS_DEBUG
|
||||
#ifdef EX_DEBUG
|
||||
char* dbg_method = NULL;
|
||||
if (hm->method.len == 3 && 0 == memcmp(hm->method.p, "GET", hm->method.len))
|
||||
dbg_method = "GET";
|
||||
|
@ -319,6 +318,7 @@ void TsHttpRpc::_mg_event_handler(struct mg_connection *nc, int ev, void *ev_dat
|
|||
|
||||
mg_printf(nc, "HTTP/1.0 200 OK\r\nAccess-Control-Allow-Origin: *\r\nContent-Length: %d\r\nContent-Type: %s\r\n\r\n", file_size, content_type.c_str());
|
||||
mg_send(nc, buf, file_size);
|
||||
delete []buf;
|
||||
nc->flags |= MG_F_SEND_AND_CLOSE;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue