mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 19:23:03 +01:00
Fixed manual TCP port assignment.
This commit is contained in:
parent
c3862b2d27
commit
318d501392
@ -85,7 +85,7 @@ const ConfigImpl::ConfigEntry ConfigImpl::entries[] =
|
||||
{TYPE_INTEGER, "DeadThreadsCollection", (ConfigValue) 50}, // number of PrioritySwitchDelay cycles before dead threads collection
|
||||
{TYPE_INTEGER, "PriorityBoost", (ConfigValue) 5}, // ratio oh high- to low-priority thread ticks in jrd.cpp
|
||||
{TYPE_STRING, "RemoteServiceName", (ConfigValue) FB_SERVICE_NAME},
|
||||
{TYPE_INTEGER, "RemoteServicePort", (ConfigValue) FB_SERVICE_PORT},
|
||||
{TYPE_INTEGER, "RemoteServicePort", (ConfigValue) 0},
|
||||
{TYPE_STRING, "RemotePipeName", (ConfigValue) FB_PIPE_NAME},
|
||||
{TYPE_STRING, "IpcName", (ConfigValue) FB_IPC_NAME},
|
||||
#ifdef WIN_NT
|
||||
|
@ -41,7 +41,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: inet.cpp,v 1.68 2003-04-10 10:31:27 aafemt Exp $
|
||||
$Id: inet.cpp,v 1.69 2003-06-25 07:39:04 dimitr Exp $
|
||||
*/
|
||||
#include "firebird.h"
|
||||
#include "../jrd/ib_stdio.h"
|
||||
@ -950,6 +950,11 @@ PORT DLL_EXPORT INET_connect(TEXT * name,
|
||||
#endif /* WIN_NT */
|
||||
THREAD_ENTER;
|
||||
|
||||
int port_num = Config::getRemoteServicePort();
|
||||
|
||||
if (port_num) {
|
||||
address.sin_port = htons(port_num);
|
||||
}
|
||||
/* Modification by luz (slightly modified by FSG)
|
||||
instead of failing here, try applying hard-wired
|
||||
translation of "gds_db" into "3050"
|
||||
@ -958,10 +963,10 @@ PORT DLL_EXPORT INET_connect(TEXT * name,
|
||||
entry in "services" file, which is important
|
||||
for zero-installation clients.
|
||||
*/
|
||||
if (!service) {
|
||||
if (strcmp(protocol, Config::getRemoteServiceName()) == 0) {
|
||||
else if (!service) {
|
||||
if (strcmp(protocol, FB_SERVICE_NAME) == 0) {
|
||||
/* apply hardwired translation */
|
||||
address.sin_port = htons(Config::getRemoteServicePort());
|
||||
address.sin_port = htons(FB_SERVICE_PORT);
|
||||
}
|
||||
|
||||
/* modification by FSG 23.MAR.2001 */
|
||||
|
Loading…
Reference in New Issue
Block a user