Skip to content

Commit 1bae73a

Browse files
committed
Added optional queue name argument to client fetchRemote
1 parent bbce8e6 commit 1bae73a

File tree

10 files changed

+107
-43
lines changed

10 files changed

+107
-43
lines changed

Client/mods/deathmatch/logic/CClientGame.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,8 +1179,7 @@ void CClientGame::DoPulses ( void )
11791179
// Pulse DownloadFiles if we're transferring stuff
11801180
GetResourceFileDownloadManager()->DoPulse();
11811181
DownloadSingularResourceFiles ();
1182-
g_pNet->GetHTTPDownloadManager ( EDownloadMode::CALL_REMOTE )->ProcessQueuedFiles ();
1183-
g_pNet->GetHTTPDownloadManager(EDownloadMode::CALL_REMOTE_ANY_HOST)->ProcessQueuedFiles();
1182+
GetRemoteCalls()->ProcessQueuedFiles();
11841183
}
11851184

11861185
// Not waiting for local connect?

Client/mods/deathmatch/logic/CRemoteCalls.cpp

Lines changed: 68 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ CRemoteCalls::~CRemoteCalls()
3131
}
3232

3333

34-
void CRemoteCalls::Call ( const char * szServerHost, const char * szResourceName, const char * szFunctionName, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, uint uiConnectionAttempts, uint uiConnectTimeoutMs )
34+
void CRemoteCalls::Call ( const char * szServerHost, const char * szResourceName, const char * szFunctionName, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, const SString& strQueueName, uint uiConnectionAttempts, uint uiConnectTimeoutMs )
3535
{
36-
m_calls.push_back ( new CRemoteCall ( szServerHost, szResourceName, szFunctionName, arguments, luaMain, iFunction, uiConnectionAttempts, uiConnectTimeoutMs ) );
36+
m_calls.push_back ( new CRemoteCall ( szServerHost, szResourceName, szFunctionName, arguments, luaMain, iFunction, strQueueName, uiConnectionAttempts, uiConnectTimeoutMs ) );
3737
m_calls.back ()->MakeCall ();
3838
}
3939

40-
void CRemoteCalls::Call ( const char * szURL, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, uint uiConnectionAttempts, uint uiConnectTimeoutMs )
40+
void CRemoteCalls::Call ( const char * szURL, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, const SString& strQueueName, uint uiConnectionAttempts, uint uiConnectTimeoutMs )
4141
{
42-
m_calls.push_back ( new CRemoteCall ( szURL, arguments, luaMain, iFunction, uiConnectionAttempts, uiConnectTimeoutMs ) );
42+
m_calls.push_back ( new CRemoteCall ( szURL, arguments, luaMain, iFunction, strQueueName, uiConnectionAttempts, uiConnectTimeoutMs ) );
4343
m_calls.back ()->MakeCall ();
4444
}
4545

46-
void CRemoteCalls::Call ( const char * szURL, CLuaArguments * fetchArguments, const SString& strPostData, bool bPostBinary, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, uint uiConnectionAttempts, uint uiConnectTimeoutMs )
46+
void CRemoteCalls::Call ( const char * szURL, CLuaArguments * fetchArguments, const SString& strPostData, bool bPostBinary, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, const SString& strQueueName, uint uiConnectionAttempts, uint uiConnectTimeoutMs )
4747
{
48-
m_calls.push_back ( new CRemoteCall ( szURL, fetchArguments, strPostData, bPostBinary, luaMain, iFunction, uiConnectionAttempts, uiConnectTimeoutMs ) );
48+
m_calls.push_back ( new CRemoteCall ( szURL, fetchArguments, strPostData, bPostBinary, luaMain, iFunction, strQueueName, uiConnectionAttempts, uiConnectTimeoutMs ) );
4949
m_calls.back ()->MakeCall ();
5050
}
5151

@@ -86,9 +86,60 @@ bool CRemoteCalls::CallExists ( CRemoteCall * call )
8686
return false;
8787
}
8888

89+
// Map queue index into download manager id
90+
EDownloadModeType CRemoteCalls::GetDownloadModeFromQueueIndex( uint uiIndex, bool bAnyHost )
91+
{
92+
uiIndex %= MAX_CALL_REMOTE_QUEUES;
93+
uiIndex += bAnyHost ? EDownloadMode::CALL_REMOTE_ANY_HOST : EDownloadMode::CALL_REMOTE_RESTRICTED;
94+
return (EDownloadModeType)uiIndex;
95+
}
96+
97+
// Map queue name to download manager id
98+
EDownloadModeType CRemoteCalls::GetDownloadModeForQueueName( const SString& strQueueName, bool bAnyHost )
99+
{
100+
uint* pIndex = MapFind( m_QueueIndexMap, strQueueName );
101+
if ( pIndex )
102+
{
103+
return GetDownloadModeFromQueueIndex( *pIndex, bAnyHost );
104+
}
105+
else
106+
{
107+
// Find lowest unused index
108+
uint idx = 0;
109+
while( MapContainsValue( m_QueueIndexMap, idx ) )
110+
{
111+
idx++;
112+
}
113+
// Add new mapping
114+
MapSet( m_QueueIndexMap, strQueueName, idx );
115+
return GetDownloadModeFromQueueIndex( idx, bAnyHost );
116+
}
117+
}
118+
119+
120+
void CRemoteCalls::ProcessQueuedFiles( void )
121+
{
122+
for ( auto iter = m_QueueIndexMap.cbegin(); iter != m_QueueIndexMap.cend(); )
123+
{
124+
EDownloadModeType downloadMode = GetDownloadModeFromQueueIndex( iter->second, false );
125+
EDownloadModeType downloadModeAnyIp = GetDownloadModeFromQueueIndex( iter->second, true );
126+
if ( g_pNet->GetHTTPDownloadManager( downloadMode )->ProcessQueuedFiles()
127+
&& g_pNet->GetHTTPDownloadManager( downloadModeAnyIp )->ProcessQueuedFiles() )
128+
{
129+
// Queue empty, so remove name mapping if not default queue
130+
if ( iter->first != CALL_REMOTE_DEFAULT_QUEUE_NAME )
131+
{
132+
iter = m_QueueIndexMap.erase( iter );
133+
continue;
134+
}
135+
}
136+
++iter;
137+
}
138+
}
139+
89140
////////////////////////////////////////////////////////////////////////////////
90141

91-
CRemoteCall::CRemoteCall ( const char * szServerHost, const char * szResourceName, const char * szFunctionName, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, uint uiConnectionAttempts, uint uiConnectTimeoutMs )
142+
CRemoteCall::CRemoteCall ( const char * szServerHost, const char * szResourceName, const char * szFunctionName, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, const SString& strQueueName, uint uiConnectionAttempts, uint uiConnectTimeoutMs )
92143
{
93144
m_VM = luaMain;
94145
m_iFunction = iFunction;
@@ -98,12 +149,13 @@ CRemoteCall::CRemoteCall ( const char * szServerHost, const char * szResourceNam
98149
m_bIsFetch = false;
99150

100151
m_strURL = SString ( "http://%s/%s/call/%s", szServerHost, szResourceName, szFunctionName );
152+
m_strQueueName = strQueueName;
101153
m_uiConnectionAttempts = uiConnectionAttempts;
102154
m_uiConnectTimeoutMs = uiConnectTimeoutMs;
103155
}
104156

105157
//arbitary URL version
106-
CRemoteCall::CRemoteCall ( const char * szURL, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, uint uiConnectionAttempts, uint uiConnectTimeoutMs )
158+
CRemoteCall::CRemoteCall ( const char * szURL, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, const SString& strQueueName, uint uiConnectionAttempts, uint uiConnectTimeoutMs )
107159
{
108160
m_VM = luaMain;
109161
m_iFunction = iFunction;
@@ -113,12 +165,13 @@ CRemoteCall::CRemoteCall ( const char * szURL, CLuaArguments * arguments, CLuaMa
113165
m_bIsFetch = false;
114166

115167
m_strURL = szURL;
168+
m_strQueueName = strQueueName;
116169
m_uiConnectionAttempts = uiConnectionAttempts;
117170
m_uiConnectTimeoutMs = uiConnectTimeoutMs;
118171
}
119172

120173
//Fetch version
121-
CRemoteCall::CRemoteCall ( const char * szURL, CLuaArguments * fetchArguments, const SString& strPostData, bool bPostBinary, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, uint uiConnectionAttempts, uint uiConnectTimeoutMs )
174+
CRemoteCall::CRemoteCall ( const char * szURL, CLuaArguments * fetchArguments, const SString& strPostData, bool bPostBinary, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, const SString& strQueueName, uint uiConnectionAttempts, uint uiConnectTimeoutMs )
122175
: m_FetchArguments ( *fetchArguments )
123176
{
124177
m_VM = luaMain;
@@ -129,6 +182,7 @@ CRemoteCall::CRemoteCall ( const char * szURL, CLuaArguments * fetchArguments, c
129182
m_bIsFetch = true;
130183

131184
m_strURL = szURL;
185+
m_strQueueName = strQueueName;
132186
m_uiConnectionAttempts = uiConnectionAttempts;
133187
m_uiConnectTimeoutMs = uiConnectTimeoutMs;
134188
}
@@ -140,18 +194,11 @@ CRemoteCall::~CRemoteCall ()
140194

141195
void CRemoteCall::MakeCall()
142196
{
143-
if (g_pCore->GetWebCore()->GetDomainState(g_pCore->GetWebCore()->GetDomainFromURL(m_strURL)) == eURLState::WEBPAGE_ALLOWED)
144-
{
145-
// Bypass IP check if we are allowed to access the URL
146-
CNetHTTPDownloadManagerInterface* pDownloadManager = g_pNet->GetHTTPDownloadManager(EDownloadMode::CALL_REMOTE_ANY_HOST);
147-
pDownloadManager->QueueFile(m_strURL, NULL, 0, m_strData.c_str(), m_strData.length(), m_bPostBinary, this, DownloadFinishedCallback, false, m_uiConnectionAttempts, m_uiConnectTimeoutMs);
148-
}
149-
else
150-
{
151-
// Proceed with the normal way (IP check in net module)
152-
CNetHTTPDownloadManagerInterface* pDownloadManager = g_pNet->GetHTTPDownloadManager(EDownloadMode::CALL_REMOTE);
153-
pDownloadManager->QueueFile(m_strURL, NULL, 0, m_strData.c_str(), m_strData.length(), m_bPostBinary, this, DownloadFinishedCallback, false, m_uiConnectionAttempts, m_uiConnectTimeoutMs);
154-
}
197+
// Bypass net module IP check if we are allowed to access the URL
198+
bool bAnyHost = (g_pCore->GetWebCore()->GetDomainState(g_pCore->GetWebCore()->GetDomainFromURL(m_strURL)) == eURLState::WEBPAGE_ALLOWED);
199+
EDownloadModeType downloadMode = g_pClientGame->GetRemoteCalls()->GetDownloadModeForQueueName(m_strQueueName, bAnyHost);
200+
CNetHTTPDownloadManagerInterface* pDownloadManager = g_pNet->GetHTTPDownloadManager(downloadMode);
201+
pDownloadManager->QueueFile(m_strURL, NULL, 0, m_strData.c_str(), m_strData.length(), m_bPostBinary, this, DownloadFinishedCallback, false, m_uiConnectionAttempts, m_uiConnectTimeoutMs);
155202
}
156203

157204
void CRemoteCall::DownloadFinishedCallback( char * data, size_t dataLength, void * obj, bool bSuccess, int iErrorCode )

Client/mods/deathmatch/logic/CRemoteCalls.h

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#ifndef __CREMOTECALLS_H
1414
#define __CREMOTECALLS_H
1515
#include "lua/CLuaArguments.h"
16+
#define CALL_REMOTE_DEFAULT_QUEUE_NAME "default"
17+
1618
/*
1719
This represents a single live remote call. Calls are live until the call returns
1820
i.e. the http client has downloaded all the data returned
@@ -26,14 +28,15 @@ class CRemoteCall
2628
class CLuaMain * m_VM;
2729
CLuaFunctionRef m_iFunction;
2830
SString m_strURL;
31+
SString m_strQueueName;
2932
uint m_uiConnectionAttempts;
3033
uint m_uiConnectTimeoutMs;
3134
CLuaArguments m_FetchArguments;
3235

3336
public:
34-
CRemoteCall ( const char * szServerHost, const char * szResourceName, const char * szFunctionName, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, uint uiConnectionAttempts, uint uiConnectTimeoutMs );
35-
CRemoteCall ( const char * szURL, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, uint uiConnectionAttempts, uint uiConnectTimeoutMs );
36-
CRemoteCall ( const char * szURL, CLuaArguments * fetchArguments, const SString& strPostData, bool bPostBinary, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, uint uiConnectionAttempts, uint uiConnectTimeoutMs );
37+
CRemoteCall ( const char * szServerHost, const char * szResourceName, const char * szFunctionName, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, const SString& strQueueName, uint uiConnectionAttempts, uint uiConnectTimeoutMs );
38+
CRemoteCall ( const char * szURL, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, const SString& strQueueName, uint uiConnectionAttempts, uint uiConnectTimeoutMs );
39+
CRemoteCall ( const char * szURL, CLuaArguments * fetchArguments, const SString& strPostData, bool bPostBinary, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, const SString& strQueueName, uint uiConnectionAttempts, uint uiConnectTimeoutMs );
3740
~CRemoteCall ();
3841
void MakeCall();
3942
static void DownloadFinishedCallback( char * data, size_t dataLength, void * obj, bool bSuccess, int iErrorCode );
@@ -51,15 +54,19 @@ class CRemoteCalls
5154
{
5255
private:
5356
std::list<CRemoteCall*> m_calls;
57+
std::map<SString,uint> m_QueueIndexMap;
5458
public:
5559
CRemoteCalls();
5660
~CRemoteCalls();
5761

58-
void Call ( const char * szServerHost, const char * szResourceName, const char * szFunctionName, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, uint uiConnectionAttempts, uint uiConnectTimeoutMs );
59-
void Call ( const char * szURL, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, uint uiConnectionAttempts, uint uiConnectTimeoutMs );
60-
void Call ( const char * szURL, CLuaArguments * fetchArguments, const SString& strPostData, bool bPostBinary, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, uint uiConnectionAttempts, uint uiConnectTimeoutMs );
62+
void Call ( const char * szServerHost, const char * szResourceName, const char * szFunctionName, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, const SString& strQueueName, uint uiConnectionAttempts, uint uiConnectTimeoutMs );
63+
void Call ( const char * szURL, CLuaArguments * arguments, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, const SString& strQueueName, uint uiConnectionAttempts, uint uiConnectTimeoutMs );
64+
void Call ( const char * szURL, CLuaArguments * fetchArguments, const SString& strPostData, bool bPostBinary, CLuaMain * luaMain, const CLuaFunctionRef& iFunction, const SString& strQueueName, uint uiConnectionAttempts, uint uiConnectTimeoutMs );
6165
void Remove ( CLuaMain * luaMain );
6266
void Remove ( CRemoteCall * call );
6367
bool CallExists ( CRemoteCall * call );
68+
void ProcessQueuedFiles ( void );
69+
EDownloadModeType GetDownloadModeForQueueName( const SString& strQueueName, bool bAnyHost );
70+
EDownloadModeType GetDownloadModeFromQueueIndex( uint uiIndex, bool bAnyHost );
6471
};
6572
#endif

Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.World.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include "StdInc.h"
2121

22+
#define MIN_CLIENT_REQ_CALLREMOTE_QUEUE_NAME "1.5.3-9.11270"
2223
#define MIN_CLIENT_REQ_FETCHREMOTE_CONNECT_TIMEOUT "1.3.5"
2324

2425
int CLuaFunctionDefs::CreateExplosion ( lua_State* luaVM )
@@ -1839,11 +1840,14 @@ int CLuaFunctionDefs::GetFPSLimit ( lua_State* luaVM )
18391840
// Call a function on a remote server
18401841
int CLuaFunctionDefs::FetchRemote ( lua_State* luaVM )
18411842
{
1842-
// bool fetchRemote ( string URL [, int connectionAttempts = 10, int connectTimeout = 10000 ], callback callbackFunction, [ string postData, bool bPostBinary, arguments... ] )
1843+
// bool fetchRemote ( string URL [, string queueName ][, int connectionAttempts = 10, int connectTimeout = 10000 ], callback callbackFunction, [ string postData, bool bPostBinary, arguments... ] )
18431844
CScriptArgReader argStream ( luaVM );
1844-
SString strURL; CLuaFunctionRef iLuaFunction; SString strPostData; bool bPostBinary; CLuaArguments args; uint uiConnectionAttempts; uint uiConnectTimeoutMs;
1845+
SString strURL; SString strQueueName; CLuaFunctionRef iLuaFunction; SString strPostData; bool bPostBinary; CLuaArguments args; uint uiConnectionAttempts; uint uiConnectTimeoutMs;
18451846

18461847
argStream.ReadString ( strURL );
1848+
if ( argStream.NextIsString () )
1849+
MinClientReqCheck ( argStream, MIN_CLIENT_REQ_CALLREMOTE_QUEUE_NAME, "'queue name' is being used" );
1850+
argStream.ReadIfNextIsString ( strQueueName, CALL_REMOTE_DEFAULT_QUEUE_NAME );
18471851
argStream.ReadIfNextIsNumber ( uiConnectionAttempts, 10 );
18481852
if ( argStream.NextIsNumber () )
18491853
MinClientReqCheck ( argStream, MIN_CLIENT_REQ_FETCHREMOTE_CONNECT_TIMEOUT, "'connect timeout' is being used" );
@@ -1859,7 +1863,7 @@ int CLuaFunctionDefs::FetchRemote ( lua_State* luaVM )
18591863
CLuaMain * luaMain = m_pLuaManager->GetVirtualMachine ( luaVM );
18601864
if ( luaMain )
18611865
{
1862-
g_pClientGame->GetRemoteCalls()->Call ( strURL, &args, strPostData, bPostBinary, luaMain, iLuaFunction, uiConnectionAttempts, uiConnectTimeoutMs );
1866+
g_pClientGame->GetRemoteCalls()->Call ( strURL, &args, strPostData, bPostBinary, luaMain, iLuaFunction, strQueueName, uiConnectionAttempts, uiConnectTimeoutMs );
18631867
lua_pushboolean ( luaVM, true );
18641868
return 1;
18651869
}

Client/sdk/net/CNet.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,25 @@
1717
#include "net/bitstream.h"
1818
#include "CNetHTTPDownloadManagerInterface.h"
1919

20+
#define MAX_CALL_REMOTE_QUEUES 100
21+
2022
namespace EDownloadMode
2123
{
2224
enum EDownloadModeType
2325
{
2426
NONE,
2527
CORE_ASE_LIST,
2628
CORE_UPDATER,
29+
WEBBROWSER_LISTS,
30+
CORE_LAST, // Download modes after this one will be reset on server disconnect
2731
RESOURCE_INITIAL_FILES_INTERNAL,
2832
RESOURCE_INITIAL_FILES_EXTERNAL,
2933
RESOURCE_SINGULAR_FILES,
30-
CALL_REMOTE,
31-
WEBBROWSER_LISTS,
3234
CONNECT_TCP_SEND,
35+
CALL_REMOTE_RESTRICTED,
36+
CALL_REMOTE_RESTRICTED_LAST = CALL_REMOTE_RESTRICTED + MAX_CALL_REMOTE_QUEUES - 1,
3337
CALL_REMOTE_ANY_HOST,
38+
CALL_REMOTE_ANY_HOST_LAST = CALL_REMOTE_ANY_HOST + MAX_CALL_REMOTE_QUEUES - 1,
3439
};
3540
}
3641
using EDownloadMode::EDownloadModeType;

Client/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676
#define _ASE_VERSION QUOTE_DEFINE(MTASA_VERSION_MAJOR) "." QUOTE_DEFINE(MTASA_VERSION_MINOR)
7777
#define _NETCODE_VERSION_BRANCH_ID 0x4 // Use 0x1 - 0xF to indicate an incompatible branch is being used (0x0 is reserved, 0x4 is trunk)
78-
#define _CLIENT_NET_MODULE_VERSION 0x0A1 // (0x000 - 0xfff) Lvl9 wizards only
78+
#define _CLIENT_NET_MODULE_VERSION 0x0A2 // (0x000 - 0xfff) Lvl9 wizards only
7979
#define _NETCODE_VERSION 0x1DA // (0x000 - 0xfff) Increment when net messages change (pre-release)
8080
#define MTA_DM_BITSTREAM_VERSION 0x06A // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).
8181

Server/mods/deathmatch/logic/CRemoteCalls.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ bool CRemoteCalls::CallExists ( CRemoteCall * call )
8686
return false;
8787
}
8888

89-
// Map quene index into download manager id
89+
// Map queue index into download manager id
9090
EDownloadModeType CRemoteCalls::GetDownloadModeFromQueueIndex( uint uiIndex )
9191
{
92-
uiIndex %= ( EDownloadMode::CALL_REMOTE_LAST - EDownloadMode::CALL_REMOTE_FIRST );
93-
uiIndex += EDownloadMode::CALL_REMOTE_FIRST;
92+
uiIndex %= MAX_CALL_REMOTE_QUEUES;
93+
uiIndex += EDownloadMode::CALL_REMOTE;
9494
return (EDownloadModeType)uiIndex;
9595
}
9696

97-
// Map quene name to download manager id
97+
// Map queue name to download manager id
9898
EDownloadModeType CRemoteCalls::GetDownloadModeForQueueName( const SString& strQueueName )
9999
{
100100
uint* pIndex = MapFind( m_QueueIndexMap, strQueueName );

Server/mods/deathmatch/logic/lua/CLuaFunctionDefs.Server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*****************************************************************************/
2222

2323
#include "StdInc.h"
24-
#define MIN_SERVER_REQ_CALLREMOTE_QUEUE_NAME "1.5.3-9.11269"
24+
#define MIN_SERVER_REQ_CALLREMOTE_QUEUE_NAME "1.5.3-9.11270"
2525
#define MIN_SERVER_REQ_CALLREMOTE_CONNECTION_ATTEMPTS "1.3.0-9.04563"
2626
#define MIN_SERVER_REQ_CALLREMOTE_CONNECT_TIMEOUT "1.3.5"
2727

Server/sdk/net/CNetServer.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@
1717
#include "ns_playerid.h"
1818
#include "CNetHTTPDownloadManagerInterface.h"
1919

20+
#define MAX_CALL_REMOTE_QUEUES 100
21+
2022
namespace EDownloadMode
2123
{
2224
enum EDownloadModeType
2325
{
2426
NONE,
2527
ASE,
26-
CALL_REMOTE_FIRST,
27-
CALL_REMOTE_LAST = CALL_REMOTE_FIRST + 100,
28+
CALL_REMOTE,
29+
CALL_REMOTE_LAST = CALL_REMOTE + MAX_CALL_REMOTE_QUEUES - 1,
2830
};
2931
}
3032
using EDownloadMode::EDownloadModeType;

Server/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878

7979
#define _ASE_VERSION QUOTE_DEFINE(MTASA_VERSION_MAJOR) "." QUOTE_DEFINE(MTASA_VERSION_MINOR)
8080
#define _NETCODE_VERSION_BRANCH_ID 0x4 // Use 0x1 - 0xF to indicate an incompatible branch is being used (0x0 is reserved, 0x4 is trunk)
81-
#define _SERVER_NET_MODULE_VERSION 0x09E // (0x000 - 0xfff) Lvl9 wizards only
81+
#define _SERVER_NET_MODULE_VERSION 0x0A2 // (0x000 - 0xfff) Lvl9 wizards only
8282
#define _NETCODE_VERSION 0x1DA // (0x000 - 0xfff) Increment when net messages change (pre-release)
8383
#define MTA_DM_BITSTREAM_VERSION 0x06A // (0x000 - 0xfff) Increment when net messages change (post-release). (Changing will also require additional backward compatibility code).
8484

0 commit comments

Comments
 (0)