mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 21:23:04 +01:00
simpler way to detect redirection attempt
This commit is contained in:
parent
8ff3dc98b3
commit
dccce62333
@ -1196,7 +1196,6 @@ int ISC_EXPORT isc_get_client_minor_version ();
|
||||
#define isc_dpb_set_db_charset 68
|
||||
#define isc_dpb_gsec_attach 69
|
||||
#define isc_dpb_address_path 70
|
||||
#define isc_dpb_remote_attachment 71
|
||||
|
||||
/**************************************************/
|
||||
/* clumplet tags used inside isc_dpb_address_path */
|
||||
@ -1341,7 +1340,6 @@ int ISC_EXPORT isc_get_client_minor_version ();
|
||||
#define isc_spb_verbose 107
|
||||
#define isc_spb_options 108
|
||||
#define isc_spb_address_path 109
|
||||
#define isc_spb_remote_attachment 110
|
||||
|
||||
|
||||
#define isc_spb_connect_timeout isc_dpb_connect_timeout
|
||||
|
@ -106,20 +106,20 @@ namespace {
|
||||
// for both services and databases attachments
|
||||
struct ParametersSet {
|
||||
UCHAR dummy_packet_interval, user_name, sys_user_name,
|
||||
password, password_enc, remote_attachment;
|
||||
password, password_enc, address_path;
|
||||
};
|
||||
const ParametersSet dpbParam = {isc_dpb_dummy_packet_interval,
|
||||
isc_dpb_user_name,
|
||||
isc_dpb_sys_user_name,
|
||||
isc_dpb_password,
|
||||
isc_dpb_password_enc,
|
||||
isc_dpb_remote_attachment};
|
||||
isc_dpb_address_path};
|
||||
const ParametersSet spbParam = {isc_spb_dummy_packet_interval,
|
||||
isc_spb_user_name,
|
||||
isc_spb_sys_user_name,
|
||||
isc_spb_password,
|
||||
isc_spb_password_enc,
|
||||
isc_spb_remote_attachment};
|
||||
isc_spb_address_path};
|
||||
}
|
||||
|
||||
static RVNT add_event(rem_port*);
|
||||
@ -5579,7 +5579,7 @@ static bool get_new_dpb(Firebird::ClumpletWriter& dpb,
|
||||
*
|
||||
**************************************/
|
||||
if (!Config::getRedirection()) {
|
||||
if (dpb.find(par.remote_attachment)) {
|
||||
if (dpb.find(par.address_path)) {
|
||||
ISC_STATUS_ARRAY local_status;
|
||||
local_status[0] = isc_arg_gds;
|
||||
local_status[1] = isc_unavailable;
|
||||
|
@ -124,12 +124,10 @@ namespace {
|
||||
// this sets of parameters help use same functions
|
||||
// for both services and databases attachments
|
||||
struct ParametersSet {
|
||||
UCHAR address_path, remote_attachment;
|
||||
UCHAR address_path;
|
||||
};
|
||||
const ParametersSet dpbParam = {isc_dpb_address_path,
|
||||
isc_dpb_remote_attachment};
|
||||
const ParametersSet spbParam = {isc_spb_address_path,
|
||||
isc_spb_remote_attachment};
|
||||
const ParametersSet dpbParam = {isc_dpb_address_path};
|
||||
const ParametersSet spbParam = {isc_spb_address_path};
|
||||
}
|
||||
|
||||
static bool accept_connection(rem_port*, P_CNCT*, PACKET*);
|
||||
@ -795,13 +793,6 @@ static void addClumplets(Firebird::ClumpletWriter& dpb_buffer,
|
||||
else
|
||||
dpb_buffer.moveNext();
|
||||
}
|
||||
|
||||
// Add marker to know later that this attachment is remote
|
||||
if (!Config::getRedirection()) {
|
||||
if (! dpb_buffer.find(par.remote_attachment)) {
|
||||
dpb_buffer.insertTag(par.remote_attachment);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static ISC_STATUS attach_database(
|
||||
|
Loading…
Reference in New Issue
Block a user