mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:03: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, "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_INTEGER, "PriorityBoost", (ConfigValue) 5}, // ratio oh high- to low-priority thread ticks in jrd.cpp
|
||||||
{TYPE_STRING, "RemoteServiceName", (ConfigValue) FB_SERVICE_NAME},
|
{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, "RemotePipeName", (ConfigValue) FB_PIPE_NAME},
|
||||||
{TYPE_STRING, "IpcName", (ConfigValue) FB_IPC_NAME},
|
{TYPE_STRING, "IpcName", (ConfigValue) FB_IPC_NAME},
|
||||||
#ifdef WIN_NT
|
#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 "firebird.h"
|
||||||
#include "../jrd/ib_stdio.h"
|
#include "../jrd/ib_stdio.h"
|
||||||
@ -950,6 +950,11 @@ PORT DLL_EXPORT INET_connect(TEXT * name,
|
|||||||
#endif /* WIN_NT */
|
#endif /* WIN_NT */
|
||||||
THREAD_ENTER;
|
THREAD_ENTER;
|
||||||
|
|
||||||
|
int port_num = Config::getRemoteServicePort();
|
||||||
|
|
||||||
|
if (port_num) {
|
||||||
|
address.sin_port = htons(port_num);
|
||||||
|
}
|
||||||
/* Modification by luz (slightly modified by FSG)
|
/* Modification by luz (slightly modified by FSG)
|
||||||
instead of failing here, try applying hard-wired
|
instead of failing here, try applying hard-wired
|
||||||
translation of "gds_db" into "3050"
|
translation of "gds_db" into "3050"
|
||||||
@ -958,10 +963,10 @@ PORT DLL_EXPORT INET_connect(TEXT * name,
|
|||||||
entry in "services" file, which is important
|
entry in "services" file, which is important
|
||||||
for zero-installation clients.
|
for zero-installation clients.
|
||||||
*/
|
*/
|
||||||
if (!service) {
|
else if (!service) {
|
||||||
if (strcmp(protocol, Config::getRemoteServiceName()) == 0) {
|
if (strcmp(protocol, FB_SERVICE_NAME) == 0) {
|
||||||
/* apply hardwired translation */
|
/* apply hardwired translation */
|
||||||
address.sin_port = htons(Config::getRemoteServicePort());
|
address.sin_port = htons(FB_SERVICE_PORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* modification by FSG 23.MAR.2001 */
|
/* modification by FSG 23.MAR.2001 */
|
||||||
|
Loading…
Reference in New Issue
Block a user