Skip to content

Commit

Permalink
Fixed bug CORE-1902 : XNET protocol does not work correctly in SuperC…
Browse files Browse the repository at this point in the history
…lassic. Thanks to Alexander Potapchenko.
  • Loading branch information
hvlad committed May 14, 2008
1 parent 171d53f commit 7d28033
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/remote/xnet.cpp
Expand Up @@ -75,7 +75,7 @@ static void server_shutdown(rem_port* port);
static rem_port* get_server_port(ULONG, XPM, ULONG, ULONG, ULONG, ISC_STATUS*);
static bool make_map(ULONG, ULONG, FILE_ID*, CADDR_T*);
static XPM make_xpm(ULONG, ULONG);
static bool server_init();
static bool server_init(USHORT);
static XPM get_free_slot(ULONG*, ULONG*, ULONG*);
static bool fork(ULONG, USHORT, ULONG*);

Expand Down Expand Up @@ -1292,7 +1292,7 @@ static rem_port* connect_server(ISC_STATUS* status_vector, USHORT flag)
**************************************/
current_process_id = getpid();

if (!server_init())
if (!server_init(flag))
return NULL;

PXNET_RESPONSE presponse = (PXNET_RESPONSE)xnet_connect_map;
Expand Down Expand Up @@ -2127,7 +2127,7 @@ static XPM make_xpm(ULONG map_number, ULONG timestamp)
}


static bool server_init()
static bool server_init(USHORT flag)
{
/**************************************
*
Expand All @@ -2152,14 +2152,14 @@ static bool server_init()
}

// init the limits
#ifdef SUPERSERVER
global_slots_per_map = XPS_MAX_NUM_CLI;
global_pages_per_slot = XPS_MAX_PAGES_PER_CLI;
#else
// For classic server there is always only 1 connection and 1 slot
global_slots_per_map = 1;

if (flag & (SRVR_multi_client | SRVR_debug)) {
global_slots_per_map = XPS_MAX_NUM_CLI;
}
else {
global_slots_per_map = 1;
}
global_pages_per_slot = XPS_MAX_PAGES_PER_CLI;
#endif

xnet_connect_mutex = 0;
xnet_connect_map_h = 0;
Expand Down

0 comments on commit 7d28033

Please sign in to comment.