1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-26 19:39:53 +03:00

Compare commits

..

9 Commits

Author SHA1 Message Date
Roel van de Wiel
82f1cc37d9
Merge 36505e3896 into 9c0b5f7001 2024-04-06 11:01:44 +09:00
Ilya Shipitsin
9c0b5f7001
Merge pull request #1970 from chipitsine/master
bump version for upcoming 5183 release
2024-03-26 09:04:38 +01:00
Ilya Shipitsin
a39560749d
Merge pull request #1969 from hiura2023/master
Fix "Session Timeouted.":  Change the time for checking wether all the TCP connectins are alive or not.
2024-03-24 20:21:24 +01:00
Ilya Shipitsin
495cddd518 bump version for upcoming 5183 release 2024-03-24 20:18:38 +01:00
hiura2023
0d9b4faae3
Merge branch 'SoftEtherVPN:master' into master 2024-03-24 19:13:07 +09:00
hiura
e8c14cba68 Fix 'Session Timeouted.': Change the time for checking wether all the TCP connectins are alive or not. 2024-03-24 19:11:24 +09:00
Ilya Shipitsin
ff37c35cfa
Merge pull request #1966 from hiura2023/master
Fix hamcore access: Correcting path separator for hamcore.
2024-03-17 04:56:15 +01:00
hiura
56c12de929 Merge branch 'master' of https://github.com/hiura2023/SoftEtherVPN 2024-03-16 13:02:38 +09:00
hiura
2789b16c12 Fix hamcore access: Correcting path separator for hamcore. 2024-03-16 12:52:46 +09:00
5 changed files with 28 additions and 4 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"cmake.configureOnOpen": false
}

View File

@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.10)
set(BUILD_NUMBER CACHE STRING "The number of the current build.") set(BUILD_NUMBER CACHE STRING "The number of the current build.")
if ("${BUILD_NUMBER}" STREQUAL "") if ("${BUILD_NUMBER}" STREQUAL "")
set(BUILD_NUMBER "5182") set(BUILD_NUMBER "5183")
endif() endif()
if (BUILD_NUMBER LESS 5180) if (BUILD_NUMBER LESS 5180)

View File

@ -1,5 +1,5 @@
{ {
"environments": [ { "BuildNumber": "5182" } ], "environments": [ { "BuildNumber": "5183" } ],
"configurations": [ "configurations": [
{ {
"name": "x64-native", "name": "x64-native",

View File

@ -615,7 +615,7 @@ void SessionMain(SESSION *s)
UINT max_conn = s->ClientOption->MaxConnection; UINT max_conn = s->ClientOption->MaxConnection;
if ((s->CurrentConnectionEstablishTime + if ((s->CurrentConnectionEstablishTime +
(UINT64)(s->ClientOption->AdditionalConnectionInterval * 1000 * 2 + CONNECTING_TIMEOUT * 2)) (UINT64)(num_tcp_conn * s->ClientOption->AdditionalConnectionInterval * 1000 * 2 + CONNECTING_TIMEOUT * 2))
<= Tick64()) <= Tick64())
{ {
if (s->ClientOption->BindLocalPort != 0 || num_tcp_conn == 0) if (s->ClientOption->BindLocalPort != 0 || num_tcp_conn == 0)

View File

@ -2124,6 +2124,24 @@ IO *FileOpenEx(char *name, bool write_mode, bool read_lock)
return ret; return ret;
} }
// Replace the specified character in the string with a new character
wchar_t *UniReplaceCharW(wchar_t *src, UINT size, wchar_t c, wchar_t newc) {
if (src == NULL)
{
return NULL;
}
for (; *src; src++, size -= sizeof(wchar_t)) {
if (size < sizeof(wchar_t)) {
break;
}
if (*src == c) {
*src = newc;
}
}
return (wchar_t *)src;
}
IO *FileOpenExW(wchar_t *name, bool write_mode, bool read_lock) IO *FileOpenExW(wchar_t *name, bool write_mode, bool read_lock)
{ {
wchar_t tmp[MAX_SIZE]; wchar_t tmp[MAX_SIZE];
@ -2140,9 +2158,12 @@ IO *FileOpenExW(wchar_t *name, bool write_mode, bool read_lock)
IO *o = ZeroMalloc(sizeof(IO)); IO *o = ZeroMalloc(sizeof(IO));
name++; name++;
UniStrCpy(o->NameW, sizeof(o->NameW), name); UniStrCpy(o->NameW, sizeof(o->NameW), name);
#ifdef OS_WIN32
UniReplaceCharW(o->NameW, sizeof(o->NameW), L'\\', L'/'); // Path separator "/" is used.
#endif // OS_WIN32
UniToStr(o->Name, sizeof(o->Name), o->NameW); UniToStr(o->Name, sizeof(o->Name), o->NameW);
o->HamMode = true; o->HamMode = true;
o->HamBuf = ReadHamcoreW(name); o->HamBuf = ReadHamcoreW(o->NameW);
if (o->HamBuf == NULL) if (o->HamBuf == NULL)
{ {
Free(o); Free(o);