mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-02-02 09:20:39 +01:00
Simplify 'Firebird' namespace usage in remote, continued.
This commit is contained in:
parent
0c5eb70309
commit
31a3bdc465
@ -201,8 +201,8 @@ public:
|
||||
void cancel(CheckStatusWrapper* status) override;
|
||||
void close(CheckStatusWrapper* status) override;
|
||||
int seek(CheckStatusWrapper* status, int mode, int offset) override; // returns position
|
||||
void deprecatedCancel(Firebird::CheckStatusWrapper* status) override;
|
||||
void deprecatedClose(Firebird::CheckStatusWrapper* status) override;
|
||||
void deprecatedCancel(CheckStatusWrapper* status) override;
|
||||
void deprecatedClose(CheckStatusWrapper* status) override;
|
||||
|
||||
public:
|
||||
explicit Blob(Rbl* handle)
|
||||
@ -213,8 +213,8 @@ public:
|
||||
|
||||
private:
|
||||
void freeClientData(CheckStatusWrapper* status, bool force = false);
|
||||
void internalCancel(Firebird::CheckStatusWrapper* status);
|
||||
void internalClose(Firebird::CheckStatusWrapper* status);
|
||||
void internalCancel(CheckStatusWrapper* status);
|
||||
void internalClose(CheckStatusWrapper* status);
|
||||
|
||||
Rbl* blob;
|
||||
};
|
||||
@ -255,9 +255,9 @@ public:
|
||||
ITransaction* join(CheckStatusWrapper* status, ITransaction* tra) override;
|
||||
Transaction* validate(CheckStatusWrapper* status, IAttachment* attachment) override;
|
||||
Transaction* enterDtc(CheckStatusWrapper* status) override;
|
||||
void deprecatedCommit(Firebird::CheckStatusWrapper* status) override;
|
||||
void deprecatedRollback(Firebird::CheckStatusWrapper* status) override;
|
||||
void deprecatedDisconnect(Firebird::CheckStatusWrapper* status) override;
|
||||
void deprecatedCommit(CheckStatusWrapper* status) override;
|
||||
void deprecatedRollback(CheckStatusWrapper* status) override;
|
||||
void deprecatedDisconnect(CheckStatusWrapper* status) override;
|
||||
|
||||
public:
|
||||
Transaction(Rtr* handle, Attachment* a)
|
||||
@ -284,9 +284,9 @@ private:
|
||||
{ }
|
||||
|
||||
void freeClientData(CheckStatusWrapper* status, bool force = false);
|
||||
void internalCommit(Firebird::CheckStatusWrapper* status);
|
||||
void internalRollback(Firebird::CheckStatusWrapper* status);
|
||||
void internalDisconnect(Firebird::CheckStatusWrapper* status);
|
||||
void internalCommit(CheckStatusWrapper* status);
|
||||
void internalRollback(CheckStatusWrapper* status);
|
||||
void internalDisconnect(CheckStatusWrapper* status);
|
||||
|
||||
Attachment* remAtt;
|
||||
Rtr* transaction;
|
||||
@ -375,26 +375,26 @@ public:
|
||||
|
||||
// IBatch implementation
|
||||
int release() override;
|
||||
void add(Firebird::CheckStatusWrapper* status, unsigned count, const void* inBuffer) override;
|
||||
void addBlob(Firebird::CheckStatusWrapper* status, unsigned length, const void* inBuffer, ISC_QUAD* blobId,
|
||||
void add(CheckStatusWrapper* status, unsigned count, const void* inBuffer) override;
|
||||
void addBlob(CheckStatusWrapper* status, unsigned length, const void* inBuffer, ISC_QUAD* blobId,
|
||||
unsigned parLength, const unsigned char* par) override;
|
||||
void appendBlobData(Firebird::CheckStatusWrapper* status, unsigned length, const void* inBuffer) override;
|
||||
void addBlobStream(Firebird::CheckStatusWrapper* status, unsigned length, const void* inBuffer) override;
|
||||
void registerBlob(Firebird::CheckStatusWrapper* status, const ISC_QUAD* existingBlob, ISC_QUAD* blobId) override;
|
||||
Firebird::IBatchCompletionState* execute(Firebird::CheckStatusWrapper* status, Firebird::ITransaction* transaction) override;
|
||||
void cancel(Firebird::CheckStatusWrapper* status) override;
|
||||
unsigned getBlobAlignment(Firebird::CheckStatusWrapper* status) override;
|
||||
void setDefaultBpb(Firebird::CheckStatusWrapper* status, unsigned parLength, const unsigned char* par) override;
|
||||
Firebird::IMessageMetadata* getMetadata(Firebird::CheckStatusWrapper* status) override;
|
||||
void close(Firebird::CheckStatusWrapper* status) override;
|
||||
void deprecatedClose(Firebird::CheckStatusWrapper* status) override;
|
||||
void appendBlobData(CheckStatusWrapper* status, unsigned length, const void* inBuffer) override;
|
||||
void addBlobStream(CheckStatusWrapper* status, unsigned length, const void* inBuffer) override;
|
||||
void registerBlob(CheckStatusWrapper* status, const ISC_QUAD* existingBlob, ISC_QUAD* blobId) override;
|
||||
IBatchCompletionState* execute(CheckStatusWrapper* status, ITransaction* transaction) override;
|
||||
void cancel(CheckStatusWrapper* status) override;
|
||||
unsigned getBlobAlignment(CheckStatusWrapper* status) override;
|
||||
void setDefaultBpb(CheckStatusWrapper* status, unsigned parLength, const unsigned char* par) override;
|
||||
IMessageMetadata* getMetadata(CheckStatusWrapper* status) override;
|
||||
void close(CheckStatusWrapper* status) override;
|
||||
void deprecatedClose(CheckStatusWrapper* status) override;
|
||||
void getInfo(CheckStatusWrapper* status,
|
||||
unsigned int itemsLength, const unsigned char* items,
|
||||
unsigned int bufferLength, unsigned char* buffer) override;
|
||||
|
||||
private:
|
||||
void freeClientData(CheckStatusWrapper* status, bool force = false);
|
||||
void internalClose(Firebird::CheckStatusWrapper* status);
|
||||
void internalClose(CheckStatusWrapper* status);
|
||||
void releaseStatement();
|
||||
void setServerInfo();
|
||||
|
||||
@ -580,7 +580,7 @@ private:
|
||||
void sendMessagePacket(unsigned size, const UCHAR* ptr, bool flash);
|
||||
void sendDeferredPacket(IStatus* status, rem_port* port, PACKET* packet, bool flash);
|
||||
|
||||
Firebird::AutoPtr<UCHAR, Firebird::ArrayDelete> messageStreamBuffer, blobStreamBuffer;
|
||||
AutoPtr<UCHAR, ArrayDelete> messageStreamBuffer, blobStreamBuffer;
|
||||
ULONG messageStream;
|
||||
UCHAR* blobStream;
|
||||
ULONG* sizePointer;
|
||||
@ -660,8 +660,8 @@ public:
|
||||
unsigned int bufferLength, unsigned char* buffer) override;
|
||||
unsigned getType(CheckStatusWrapper* status) override;
|
||||
const char* getPlan(CheckStatusWrapper* status, FB_BOOLEAN detailed) override;
|
||||
Firebird::IMessageMetadata* getInputMetadata(CheckStatusWrapper* status) override;
|
||||
Firebird::IMessageMetadata* getOutputMetadata(CheckStatusWrapper* status) override;
|
||||
IMessageMetadata* getInputMetadata(CheckStatusWrapper* status) override;
|
||||
IMessageMetadata* getOutputMetadata(CheckStatusWrapper* status) override;
|
||||
ISC_UINT64 getAffectedRecords(CheckStatusWrapper* status) override;
|
||||
ITransaction* execute(CheckStatusWrapper* status, ITransaction* tra,
|
||||
IMessageMetadata* inMetadata, void* inBuffer,
|
||||
@ -768,8 +768,8 @@ public:
|
||||
void getInfo(CheckStatusWrapper* status, int level,
|
||||
unsigned int itemsLength, const unsigned char* items,
|
||||
unsigned int bufferLength, unsigned char* buffer) override;
|
||||
void start(CheckStatusWrapper* status, Firebird::ITransaction* tra, int level) override;
|
||||
void startAndSend(CheckStatusWrapper* status, Firebird::ITransaction* tra, int level, unsigned int msg_type,
|
||||
void start(CheckStatusWrapper* status, ITransaction* tra, int level) override;
|
||||
void startAndSend(CheckStatusWrapper* status, ITransaction* tra, int level, unsigned int msg_type,
|
||||
unsigned int length, const void* message) override;
|
||||
void unwind(CheckStatusWrapper* status, int level) override;
|
||||
void free(CheckStatusWrapper* status) override;
|
||||
@ -858,17 +858,17 @@ public:
|
||||
void getInfo(CheckStatusWrapper* status,
|
||||
unsigned int itemsLength, const unsigned char* items,
|
||||
unsigned int bufferLength, unsigned char* buffer) override;
|
||||
Firebird::ITransaction* startTransaction(CheckStatusWrapper* status,
|
||||
ITransaction* startTransaction(CheckStatusWrapper* status,
|
||||
unsigned int tpbLength, const unsigned char* tpb) override;
|
||||
Firebird::ITransaction* reconnectTransaction(CheckStatusWrapper* status, unsigned int length, const unsigned char* id) override;
|
||||
Firebird::IRequest* compileRequest(CheckStatusWrapper* status, unsigned int blr_length, const unsigned char* blr) override;
|
||||
ITransaction* reconnectTransaction(CheckStatusWrapper* status, unsigned int length, const unsigned char* id) override;
|
||||
IRequest* compileRequest(CheckStatusWrapper* status, unsigned int blr_length, const unsigned char* blr) override;
|
||||
void transactRequest(CheckStatusWrapper* status, ITransaction* transaction,
|
||||
unsigned int blr_length, const unsigned char* blr,
|
||||
unsigned int in_msg_length, const unsigned char* in_msg,
|
||||
unsigned int out_msg_length, unsigned char* out_msg) override;
|
||||
Firebird::IBlob* createBlob(CheckStatusWrapper* status, ITransaction* transaction,
|
||||
IBlob* createBlob(CheckStatusWrapper* status, ITransaction* transaction,
|
||||
ISC_QUAD* id, unsigned int bpbLength = 0, const unsigned char* bpb = 0) override;
|
||||
Firebird::IBlob* openBlob(CheckStatusWrapper* status, ITransaction* transaction,
|
||||
IBlob* openBlob(CheckStatusWrapper* status, ITransaction* transaction,
|
||||
ISC_QUAD* id, unsigned int bpbLength = 0, const unsigned char* bpb = 0) override;
|
||||
int getSlice(CheckStatusWrapper* status, ITransaction* transaction, ISC_QUAD* id,
|
||||
unsigned int sdl_length, const unsigned char* sdl,
|
||||
@ -882,32 +882,32 @@ public:
|
||||
const unsigned char* dyn) override;
|
||||
Statement* prepare(CheckStatusWrapper* status, ITransaction* transaction,
|
||||
unsigned int stmtLength, const char* sqlStmt, unsigned dialect, unsigned int flags) override;
|
||||
Firebird::ITransaction* execute(CheckStatusWrapper* status, ITransaction* transaction,
|
||||
ITransaction* execute(CheckStatusWrapper* status, ITransaction* transaction,
|
||||
unsigned int stmtLength, const char* sqlStmt, unsigned dialect,
|
||||
IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata, void* outBuffer) override;
|
||||
Firebird::IResultSet* openCursor(CheckStatusWrapper* status, ITransaction* transaction,
|
||||
IResultSet* openCursor(CheckStatusWrapper* status, ITransaction* transaction,
|
||||
unsigned int stmtLength, const char* sqlStmt, unsigned dialect,
|
||||
IMessageMetadata* inMetadata, void* inBuffer, Firebird::IMessageMetadata* outMetadata,
|
||||
IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outMetadata,
|
||||
const char* cursorName, unsigned int cursorFlags) override;
|
||||
Firebird::IEvents* queEvents(CheckStatusWrapper* status, Firebird::IEventCallback* callback,
|
||||
IEvents* queEvents(CheckStatusWrapper* status, IEventCallback* callback,
|
||||
unsigned int length, const unsigned char* events) override;
|
||||
void cancelOperation(CheckStatusWrapper* status, int option) override;
|
||||
void ping(CheckStatusWrapper* status) override;
|
||||
void detach(CheckStatusWrapper* status) override;
|
||||
void dropDatabase(CheckStatusWrapper* status) override;
|
||||
void deprecatedDetach(Firebird::CheckStatusWrapper* status) override;
|
||||
void deprecatedDropDatabase(Firebird::CheckStatusWrapper* status) override;
|
||||
void deprecatedDetach(CheckStatusWrapper* status) override;
|
||||
void deprecatedDropDatabase(CheckStatusWrapper* status) override;
|
||||
|
||||
unsigned int getIdleTimeout(CheckStatusWrapper* status) override;
|
||||
void setIdleTimeout(CheckStatusWrapper* status, unsigned int timeOut) override;
|
||||
unsigned int getStatementTimeout(CheckStatusWrapper* status) override;
|
||||
void setStatementTimeout(CheckStatusWrapper* status, unsigned int timeOut) override;
|
||||
|
||||
Batch* createBatch(Firebird::CheckStatusWrapper* status, ITransaction* transaction,
|
||||
Batch* createBatch(CheckStatusWrapper* status, ITransaction* transaction,
|
||||
unsigned stmtLength, const char* sqlStmt, unsigned dialect,
|
||||
IMessageMetadata* inMetadata, unsigned parLength, const unsigned char* par) override;
|
||||
|
||||
Replicator* createReplicator(Firebird::CheckStatusWrapper* status) override;
|
||||
Replicator* createReplicator(CheckStatusWrapper* status) override;
|
||||
|
||||
public:
|
||||
Attachment(Rdb* handle, const PathName& path)
|
||||
@ -933,8 +933,8 @@ public:
|
||||
private:
|
||||
void execWithCheck(CheckStatusWrapper* status, const string& stmt);
|
||||
void freeClientData(CheckStatusWrapper* status, bool force = false);
|
||||
void internalDetach(Firebird::CheckStatusWrapper* status);
|
||||
void internalDropDatabase(Firebird::CheckStatusWrapper* status);
|
||||
void internalDetach(CheckStatusWrapper* status);
|
||||
void internalDropDatabase(CheckStatusWrapper* status);
|
||||
SLONG getSingleInfo(CheckStatusWrapper* status, UCHAR infoItem);
|
||||
|
||||
Rdb* rdb;
|
||||
@ -1026,7 +1026,7 @@ protected:
|
||||
const unsigned char* spb, bool loopback);
|
||||
|
||||
private:
|
||||
Firebird::ICryptKeyCallback* cryptCallback;
|
||||
ICryptKeyCallback* cryptCallback;
|
||||
};
|
||||
|
||||
void RProvider::shutdown(CheckStatusWrapper* status, unsigned int /*timeout*/, const int /*reason*/)
|
||||
@ -1069,7 +1069,7 @@ namespace {
|
||||
SimpleFactory<Loopback> loopbackFactory;
|
||||
}
|
||||
|
||||
void registerRedirector(Firebird::IPluginManager* iPlugin)
|
||||
void registerRedirector(IPluginManager* iPlugin)
|
||||
{
|
||||
iPlugin->registerPluginFactory(IPluginManager::TYPE_PROVIDER, "Remote", &remoteFactory);
|
||||
iPlugin->registerPluginFactory(IPluginManager::TYPE_PROVIDER, "Loopback", &loopbackFactory);
|
||||
@ -1101,7 +1101,7 @@ static void add_other_params(rem_port*, ClumpletWriter&, const ParametersSet&);
|
||||
static void add_working_directory(ClumpletWriter&, const PathName&);
|
||||
static rem_port* analyze(ClntAuthBlock& cBlock, PathName& attach_name, unsigned flags,
|
||||
ClumpletWriter& pb, const ParametersSet& parSet, PathName& node_name, PathName* ref_db_name,
|
||||
Firebird::ICryptKeyCallback* cryptCb);
|
||||
ICryptKeyCallback* cryptCb);
|
||||
static void batch_gds_receive(rem_port*, struct rmtque *, USHORT);
|
||||
static void batch_dsql_fetch(rem_port*, struct rmtque *, USHORT);
|
||||
static void clear_queue(rem_port*);
|
||||
@ -1140,7 +1140,7 @@ static void server_death(rem_port*);
|
||||
static void svcstart(CheckStatusWrapper*, Rdb*, P_OP, USHORT, USHORT, USHORT, const UCHAR*);
|
||||
static void unsupported();
|
||||
static void zap_packet(PACKET *);
|
||||
static void cleanDpb(Firebird::ClumpletWriter&, const ParametersSet*);
|
||||
static void cleanDpb(ClumpletWriter&, const ParametersSet*);
|
||||
static void authFillParametersBlock(ClntAuthBlock& authItr, ClumpletWriter& dpb,
|
||||
const ParametersSet* tags, rem_port* port);
|
||||
static void authReceiveResponse(bool havePacket, ClntAuthBlock& authItr, rem_port* port,
|
||||
@ -1694,7 +1694,7 @@ Transaction* Transaction::enterDtc(CheckStatusWrapper* status)
|
||||
}
|
||||
|
||||
|
||||
Firebird::IRequest* Attachment::compileRequest(CheckStatusWrapper* status,
|
||||
IRequest* Attachment::compileRequest(CheckStatusWrapper* status,
|
||||
unsigned int blr_length, const unsigned char* blr)
|
||||
{
|
||||
/**************************************
|
||||
@ -1772,7 +1772,7 @@ Firebird::IRequest* Attachment::compileRequest(CheckStatusWrapper* status,
|
||||
message->msg_address = NULL;
|
||||
}
|
||||
|
||||
Firebird::IRequest* r = FB_NEW Request(request, this);
|
||||
IRequest* r = FB_NEW Request(request, this);
|
||||
r->addRef();
|
||||
return r;
|
||||
}
|
||||
@ -1851,7 +1851,7 @@ IBlob* Attachment::createBlob(CheckStatusWrapper* status, ITransaction* apiTra,
|
||||
blob->rbl_next = transaction->rtr_blobs;
|
||||
transaction->rtr_blobs = blob;
|
||||
|
||||
Firebird::IBlob* b = FB_NEW Blob(blob);
|
||||
IBlob* b = FB_NEW Blob(blob);
|
||||
b->addRef();
|
||||
return b;
|
||||
}
|
||||
@ -1863,7 +1863,7 @@ IBlob* Attachment::createBlob(CheckStatusWrapper* status, ITransaction* apiTra,
|
||||
}
|
||||
|
||||
|
||||
Firebird::IAttachment* RProvider::create(CheckStatusWrapper* status, const char* filename,
|
||||
IAttachment* RProvider::create(CheckStatusWrapper* status, const char* filename,
|
||||
unsigned int dpb_length, const unsigned char* dpb, bool loopback)
|
||||
{
|
||||
/**************************************
|
||||
@ -1918,7 +1918,7 @@ Firebird::IAttachment* RProvider::create(CheckStatusWrapper* status, const char*
|
||||
if (!init(status, cBlock, port, op_create, expanded_name, newDpb, intl, cryptCallback))
|
||||
return NULL;
|
||||
|
||||
Firebird::IAttachment* a = FB_NEW Attachment(rdb, filename);
|
||||
IAttachment* a = FB_NEW Attachment(rdb, filename);
|
||||
a->addRef();
|
||||
return a;
|
||||
}
|
||||
@ -2120,7 +2120,7 @@ void Attachment::freeClientData(CheckStatusWrapper* status, bool force)
|
||||
// free the packet and disconnect the port. Put something into firebird.log
|
||||
// informing the user of the following.
|
||||
|
||||
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status->getState() & IStatus::STATE_ERRORS)
|
||||
{
|
||||
iscLogStatus("REMOTE INTERFACE/gds__detach: Unsuccessful detach from "
|
||||
"database.\n\tUncommitted work may have been lost.", status);
|
||||
@ -2352,13 +2352,13 @@ Batch* Attachment::createBatch(CheckStatusWrapper* status, ITransaction* transac
|
||||
*
|
||||
**************************************/
|
||||
Statement* stmt = prepare(status, transaction, stmtLength, sqlStmt, dialect, 0);
|
||||
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status->getState() & IStatus::STATE_ERRORS)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Batch* rc = stmt->createBatch(status, inMetadata, parLength, par);
|
||||
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status->getState() & IStatus::STATE_ERRORS)
|
||||
{
|
||||
stmt->release();
|
||||
return NULL;
|
||||
@ -3543,7 +3543,7 @@ ITransaction* Statement::execute(CheckStatusWrapper* status, ITransaction* apiTr
|
||||
}
|
||||
|
||||
|
||||
ResultSet* Statement::openCursor(CheckStatusWrapper* status, Firebird::ITransaction* apiTra,
|
||||
ResultSet* Statement::openCursor(CheckStatusWrapper* status, ITransaction* apiTra,
|
||||
IMessageMetadata* inMetadata, void* inBuffer, IMessageMetadata* outFormat, unsigned int flags)
|
||||
{
|
||||
/**************************************
|
||||
@ -3580,7 +3580,7 @@ ResultSet* Statement::openCursor(CheckStatusWrapper* status, Firebird::ITransact
|
||||
if (!outFormat)
|
||||
{
|
||||
defaultOutputFormat.assignRefNoIncr(this->getOutputMetadata(status));
|
||||
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status->getState() & IStatus::STATE_ERRORS)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@ -3665,7 +3665,7 @@ ResultSet* Statement::openCursor(CheckStatusWrapper* status, Firebird::ITransact
|
||||
sqldata->p_sqldata_cursor_flags = flags;
|
||||
|
||||
{
|
||||
Firebird::Cleanup msgClean([&message] {
|
||||
Cleanup msgClean([&message] {
|
||||
message->msg_address = NULL;
|
||||
});
|
||||
|
||||
@ -3699,13 +3699,13 @@ IResultSet* Attachment::openCursor(CheckStatusWrapper* status, ITransaction* tra
|
||||
{
|
||||
Statement* stmt = prepare(status, transaction, stmtLength, sqlStmt, dialect,
|
||||
(outMetadata ? 0 : IStatement::PREPARE_PREFETCH_OUTPUT_PARAMETERS));
|
||||
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status->getState() & IStatus::STATE_ERRORS)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ResultSet* rc = stmt->openCursor(status, transaction, inMetadata, inBuffer, outMetadata, cursorFlags);
|
||||
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status->getState() & IStatus::STATE_ERRORS)
|
||||
{
|
||||
stmt->release();
|
||||
return NULL;
|
||||
@ -3714,7 +3714,7 @@ IResultSet* Attachment::openCursor(CheckStatusWrapper* status, ITransaction* tra
|
||||
if (cursorName)
|
||||
{
|
||||
stmt->setCursorName(status, cursorName);
|
||||
if (status->getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status->getState() & IStatus::STATE_ERRORS)
|
||||
{
|
||||
rc->release();
|
||||
stmt->release();
|
||||
@ -3890,7 +3890,7 @@ ITransaction* Attachment::execute(CheckStatusWrapper* status, ITransaction* apiT
|
||||
else if (!transaction && packet->p_resp.p_resp_object)
|
||||
{
|
||||
transaction = make_transaction(rdb, packet->p_resp.p_resp_object);
|
||||
Firebird::ITransaction* newTrans = FB_NEW Transaction(transaction, this);
|
||||
ITransaction* newTrans = FB_NEW Transaction(transaction, this);
|
||||
newTrans->addRef();
|
||||
return newTrans;
|
||||
}
|
||||
@ -4191,7 +4191,7 @@ Statement* Attachment::prepare(CheckStatusWrapper* status, ITransaction* apiTra,
|
||||
response->p_resp_object = 0;
|
||||
}
|
||||
|
||||
if (!(status->getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status->getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
return stmt;
|
||||
}
|
||||
@ -5945,7 +5945,7 @@ void Attachment::putSlice(CheckStatusWrapper* status, ITransaction* apiTra, ISC_
|
||||
}
|
||||
|
||||
|
||||
Firebird::IEvents* Attachment::queEvents(CheckStatusWrapper* status, Firebird::IEventCallback* callback,
|
||||
IEvents* Attachment::queEvents(CheckStatusWrapper* status, IEventCallback* callback,
|
||||
unsigned int length, const unsigned char* events)
|
||||
{
|
||||
/**************************************
|
||||
@ -6016,7 +6016,7 @@ Firebird::IEvents* Attachment::queEvents(CheckStatusWrapper* status, Firebird::I
|
||||
send_packet(port, packet);
|
||||
receive_response(status, rdb, packet);
|
||||
|
||||
Firebird::IEvents* rc = FB_NEW Events(rem_event);
|
||||
IEvents* rc = FB_NEW Events(rem_event);
|
||||
rc->addRef();
|
||||
return rc;
|
||||
}
|
||||
@ -6181,7 +6181,7 @@ void Request::receive(CheckStatusWrapper* status, int level, unsigned int msg_ty
|
||||
}
|
||||
|
||||
|
||||
Firebird::ITransaction* Attachment::reconnectTransaction(CheckStatusWrapper* status,
|
||||
ITransaction* Attachment::reconnectTransaction(CheckStatusWrapper* status,
|
||||
unsigned int length, const unsigned char* id)
|
||||
{
|
||||
/**************************************
|
||||
@ -6214,7 +6214,7 @@ Firebird::ITransaction* Attachment::reconnectTransaction(CheckStatusWrapper* sta
|
||||
|
||||
send_and_receive(status, rdb, packet);
|
||||
|
||||
Firebird::ITransaction* t = FB_NEW Transaction(make_transaction(rdb, packet->p_resp.p_resp_object), this);
|
||||
ITransaction* t = FB_NEW Transaction(make_transaction(rdb, packet->p_resp.p_resp_object), this);
|
||||
t->addRef();
|
||||
return t;
|
||||
}
|
||||
@ -6640,7 +6640,7 @@ void Request::send(CheckStatusWrapper* status, int level, unsigned int msg_type,
|
||||
}
|
||||
|
||||
|
||||
Firebird::IService* RProvider::attachSvc(CheckStatusWrapper* status, const char* service,
|
||||
IService* RProvider::attachSvc(CheckStatusWrapper* status, const char* service,
|
||||
unsigned int spbLength, const unsigned char* spb, bool loopback)
|
||||
{
|
||||
/**************************************
|
||||
@ -6692,7 +6692,7 @@ Firebird::IService* RProvider::attachSvc(CheckStatusWrapper* status, const char*
|
||||
if (!init(status, cBlock, port, op_service_attach, expanded_name, newSpb, intl, cryptCallback))
|
||||
return NULL;
|
||||
|
||||
Firebird::IService* s = FB_NEW Service(rdb);
|
||||
IService* s = FB_NEW Service(rdb);
|
||||
s->addRef();
|
||||
return s;
|
||||
}
|
||||
@ -6704,7 +6704,7 @@ Firebird::IService* RProvider::attachSvc(CheckStatusWrapper* status, const char*
|
||||
}
|
||||
|
||||
|
||||
Firebird::IService* RProvider::attachServiceManager(CheckStatusWrapper* status, const char* service,
|
||||
IService* RProvider::attachServiceManager(CheckStatusWrapper* status, const char* service,
|
||||
unsigned int spbLength, const unsigned char* spb)
|
||||
{
|
||||
/**************************************
|
||||
@ -6722,7 +6722,7 @@ Firebird::IService* RProvider::attachServiceManager(CheckStatusWrapper* status,
|
||||
}
|
||||
|
||||
|
||||
Firebird::IService* Loopback::attachServiceManager(CheckStatusWrapper* status, const char* service,
|
||||
IService* Loopback::attachServiceManager(CheckStatusWrapper* status, const char* service,
|
||||
unsigned int spbLength, const unsigned char* spb)
|
||||
{
|
||||
/**************************************
|
||||
@ -6906,7 +6906,7 @@ void Service::start(CheckStatusWrapper* status,
|
||||
}
|
||||
|
||||
|
||||
void Request::startAndSend(CheckStatusWrapper* status, Firebird::ITransaction* apiTra, int level,
|
||||
void Request::startAndSend(CheckStatusWrapper* status, ITransaction* apiTra, int level,
|
||||
unsigned int msg_type, unsigned int /*length*/, const void* msg)
|
||||
{
|
||||
/**************************************
|
||||
@ -6985,7 +6985,7 @@ void Request::startAndSend(CheckStatusWrapper* status, Firebird::ITransaction* a
|
||||
}
|
||||
|
||||
|
||||
void Request::start(CheckStatusWrapper* status, Firebird::ITransaction* apiTra, int level)
|
||||
void Request::start(CheckStatusWrapper* status, ITransaction* apiTra, int level)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -7047,7 +7047,7 @@ void Request::start(CheckStatusWrapper* status, Firebird::ITransaction* apiTra,
|
||||
}
|
||||
|
||||
|
||||
Firebird::ITransaction* Attachment::startTransaction(CheckStatusWrapper* status, unsigned int tpbLength,
|
||||
ITransaction* Attachment::startTransaction(CheckStatusWrapper* status, unsigned int tpbLength,
|
||||
const unsigned char* tpb)
|
||||
{
|
||||
/**************************************
|
||||
@ -7086,7 +7086,7 @@ Firebird::ITransaction* Attachment::startTransaction(CheckStatusWrapper* status,
|
||||
|
||||
send_and_receive(status, rdb, packet);
|
||||
|
||||
Firebird::ITransaction* t = FB_NEW Transaction(make_transaction(rdb, packet->p_resp.p_resp_object), this);
|
||||
ITransaction* t = FB_NEW Transaction(make_transaction(rdb, packet->p_resp.p_resp_object), this);
|
||||
t->addRef();
|
||||
return t;
|
||||
}
|
||||
@ -7445,7 +7445,7 @@ static void authenticateStep0(ClntAuthBlock& cBlock)
|
||||
case IAuth::AUTH_MORE_DATA:
|
||||
return;
|
||||
case IAuth::AUTH_FAILED:
|
||||
if (s.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (s.getState() & IStatus::STATE_ERRORS)
|
||||
{
|
||||
iscLogStatus("Authentication, client plugin:", &s);
|
||||
}
|
||||
@ -7479,7 +7479,7 @@ static void secureAuthentication(ClntAuthBlock& cBlock, rem_port* port)
|
||||
CheckStatusWrapper st(&ls);
|
||||
authReceiveResponse(true, cBlock, port, rdb, &st, packet, true);
|
||||
|
||||
if (st.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (st.getState() & IStatus::STATE_ERRORS)
|
||||
status_exception::raise(&st);
|
||||
}
|
||||
else
|
||||
@ -7492,7 +7492,7 @@ static void secureAuthentication(ClntAuthBlock& cBlock, rem_port* port)
|
||||
|
||||
static rem_port* analyze(ClntAuthBlock& cBlock, PathName& attach_name, unsigned flags,
|
||||
ClumpletWriter& pb, const ParametersSet& parSet, PathName& node_name, PathName* ref_db_name,
|
||||
Firebird::ICryptKeyCallback* cryptCb)
|
||||
ICryptKeyCallback* cryptCb)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -9662,7 +9662,7 @@ Transaction* Attachment::remoteTransactionInterface(ITransaction* apiTra)
|
||||
return static_cast<Transaction*>(valid);
|
||||
}
|
||||
|
||||
static void cleanDpb(Firebird::ClumpletWriter& dpb, const ParametersSet* tags)
|
||||
static void cleanDpb(ClumpletWriter& dpb, const ParametersSet* tags)
|
||||
{
|
||||
dpb.deleteWithTag(tags->password);
|
||||
dpb.deleteWithTag(tags->password_enc);
|
||||
@ -9686,7 +9686,7 @@ void ClientPortsCleanup::closePort(rem_port* port)
|
||||
}
|
||||
|
||||
|
||||
RmtAuthBlock::RmtAuthBlock(const Firebird::AuthReader::AuthBlock& aBlock)
|
||||
RmtAuthBlock::RmtAuthBlock(const AuthReader::AuthBlock& aBlock)
|
||||
: buffer(*getDefaultMemoryPool(), aBlock),
|
||||
rdr(*getDefaultMemoryPool(), buffer),
|
||||
info(*getDefaultMemoryPool())
|
||||
@ -9721,7 +9721,7 @@ const char* RmtAuthBlock::getOriginalPlugin()
|
||||
return info.origPlug.nullStr();
|
||||
}
|
||||
|
||||
FB_BOOLEAN RmtAuthBlock::next(Firebird::CheckStatusWrapper* status)
|
||||
FB_BOOLEAN RmtAuthBlock::next(CheckStatusWrapper* status)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -9735,7 +9735,7 @@ FB_BOOLEAN RmtAuthBlock::next(Firebird::CheckStatusWrapper* status)
|
||||
return FB_FALSE;
|
||||
}
|
||||
|
||||
FB_BOOLEAN RmtAuthBlock::first(Firebird::CheckStatusWrapper* status)
|
||||
FB_BOOLEAN RmtAuthBlock::first(CheckStatusWrapper* status)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -9758,7 +9758,7 @@ FB_BOOLEAN RmtAuthBlock::loadInfo()
|
||||
}
|
||||
|
||||
|
||||
ClntAuthBlock::ClntAuthBlock(const Firebird::PathName* fileName, Firebird::ClumpletReader* dpb,
|
||||
ClntAuthBlock::ClntAuthBlock(const PathName* fileName, ClumpletReader* dpb,
|
||||
const ParametersSet* tags)
|
||||
: pluginList(getPool()), serverPluginList(getPool()),
|
||||
cliUserName(getPool()), cliPassword(getPool()), cliOrigUserName(getPool()),
|
||||
@ -9791,7 +9791,7 @@ void ClntAuthBlock::resetDataFromPlugin()
|
||||
dataFromPlugin.clear();
|
||||
}
|
||||
|
||||
void ClntAuthBlock::extractDataFromPluginTo(Firebird::ClumpletWriter& dpb,
|
||||
void ClntAuthBlock::extractDataFromPluginTo(ClumpletWriter& dpb,
|
||||
const ParametersSet* tags,
|
||||
int protocol)
|
||||
{
|
||||
@ -9838,7 +9838,7 @@ void ClntAuthBlock::extractDataFromPluginTo(Firebird::ClumpletWriter& dpb,
|
||||
dpb.insertBytes(tags->trusted_auth, dataFromPlugin.begin(), dataFromPlugin.getCount());
|
||||
}
|
||||
|
||||
static inline void makeUtfString(bool uft8Convert, Firebird::string& s)
|
||||
static inline void makeUtfString(bool uft8Convert, string& s)
|
||||
{
|
||||
if (uft8Convert)
|
||||
{
|
||||
@ -9847,7 +9847,7 @@ static inline void makeUtfString(bool uft8Convert, Firebird::string& s)
|
||||
ISC_unescape(s);
|
||||
}
|
||||
|
||||
void ClntAuthBlock::loadClnt(Firebird::ClumpletWriter& dpb, const ParametersSet* tags)
|
||||
void ClntAuthBlock::loadClnt(ClumpletWriter& dpb, const ParametersSet* tags)
|
||||
{
|
||||
bool uft8Convert = !dpb.find(tags->utf8_filename);
|
||||
|
||||
@ -9950,9 +9950,9 @@ void ClntAuthBlock::putData(CheckStatusWrapper* status, unsigned int length, con
|
||||
}
|
||||
}
|
||||
|
||||
bool ClntAuthBlock::checkPluginName(Firebird::PathName& nameToCheck)
|
||||
bool ClntAuthBlock::checkPluginName(PathName& nameToCheck)
|
||||
{
|
||||
Firebird::ParsedList parsed(pluginList);
|
||||
ParsedList parsed(pluginList);
|
||||
for (unsigned i = 0; i < parsed.getCount(); ++i)
|
||||
{
|
||||
if (parsed[i] == nameToCheck)
|
||||
@ -9963,7 +9963,7 @@ bool ClntAuthBlock::checkPluginName(Firebird::PathName& nameToCheck)
|
||||
return false;
|
||||
}
|
||||
|
||||
Firebird::ICryptKey* ClntAuthBlock::newKey(CheckStatusWrapper* status)
|
||||
ICryptKey* ClntAuthBlock::newKey(CheckStatusWrapper* status)
|
||||
{
|
||||
status->init();
|
||||
try
|
||||
@ -10007,7 +10007,7 @@ void ClntAuthBlock::releaseKeys(unsigned from)
|
||||
}
|
||||
}
|
||||
|
||||
void ClntAuthBlock::createCryptCallback(Firebird::ICryptKeyCallback** callback)
|
||||
void ClntAuthBlock::createCryptCallback(ICryptKeyCallback** callback)
|
||||
{
|
||||
if (*callback)
|
||||
return;
|
||||
@ -10017,7 +10017,7 @@ void ClntAuthBlock::createCryptCallback(Firebird::ICryptKeyCallback** callback)
|
||||
createdInterface = callback;
|
||||
}
|
||||
|
||||
Firebird::ICryptKeyCallback* ClntAuthBlock::ClientCrypt::create(const Config* conf)
|
||||
ICryptKeyCallback* ClntAuthBlock::ClientCrypt::create(const Config* conf)
|
||||
{
|
||||
pluginItr.set(conf);
|
||||
|
||||
|
@ -237,7 +237,7 @@ rem_port* XNET_analyze(ClntAuthBlock* cBlock,
|
||||
const PathName& file_name,
|
||||
bool uv_flag,
|
||||
RefPtr<const Config>* config,
|
||||
const Firebird::PathName* ref_db_name)
|
||||
const PathName* ref_db_name)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -361,10 +361,10 @@ rem_port* XNET_analyze(ClntAuthBlock* cBlock,
|
||||
case op_response:
|
||||
try
|
||||
{
|
||||
Firebird::LocalStatus warning; // Ignore connect warnings for a while
|
||||
LocalStatus warning; // Ignore connect warnings for a while
|
||||
REMOTE_check_response(&warning, rdb, packet);
|
||||
}
|
||||
catch (const Firebird::Exception&)
|
||||
catch (const Exception&)
|
||||
{
|
||||
disconnect(port);
|
||||
delete rdb;
|
||||
@ -405,7 +405,7 @@ rem_port* XNET_analyze(ClntAuthBlock* cBlock,
|
||||
|
||||
rem_port* XNET_connect(PACKET* packet,
|
||||
USHORT flag,
|
||||
Firebird::RefPtr<const Config>* config)
|
||||
RefPtr<const Config>* config)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1108,7 +1108,7 @@ rem_port* XnetClientEndPoint::connect_client(PACKET* packet, const RefPtr<const
|
||||
*
|
||||
**************************************/
|
||||
|
||||
const Firebird::RefPtr<const Config>& conf(config ? *config : Config::getDefaultConfig());
|
||||
const RefPtr<const Config>& conf(config ? *config : Config::getDefaultConfig());
|
||||
|
||||
if (!xnet_initialized)
|
||||
{
|
||||
|
@ -36,6 +36,8 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
using namespace Firebird;
|
||||
|
||||
const unsigned int SHUTDOWN_TIMEOUT = 10 * 1000; // 10 seconds
|
||||
|
||||
static void WINAPI control_thread(DWORD);
|
||||
@ -44,8 +46,8 @@ static USHORT report_status(DWORD, DWORD, DWORD, DWORD);
|
||||
|
||||
static ThreadEntryPoint* main_handler;
|
||||
static SERVICE_STATUS_HANDLE service_handle;
|
||||
static Firebird::GlobalPtr<Firebird::string> service_name;
|
||||
static Firebird::GlobalPtr<Firebird::string> mutex_name;
|
||||
static GlobalPtr<string> service_name;
|
||||
static GlobalPtr<string> mutex_name;
|
||||
static HANDLE stop_event_handle;
|
||||
static HANDLE hMutex = NULL;
|
||||
|
||||
@ -99,7 +101,7 @@ void WINAPI CNTL_main_thread( DWORD /*argc*/, char* /*argv*/[])
|
||||
temp = WaitForSingleObject(stop_event_handle, INFINITE);
|
||||
}
|
||||
}
|
||||
catch (const Firebird::Exception& ex)
|
||||
catch (const Exception& ex)
|
||||
{
|
||||
iscLogException("CNTL: cannot start service handler thread", ex);
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ int WINAPI WinMain(HINSTANCE hThisInst, HINSTANCE /*hPrevInst*/, LPSTR lpszArgs,
|
||||
}
|
||||
|
||||
{
|
||||
Firebird::MasterInterfacePtr master;
|
||||
MasterInterfacePtr master;
|
||||
master->serverMode(server_flag & SRVR_multi_client ? 1 : 0);
|
||||
}
|
||||
|
||||
|
@ -431,7 +431,7 @@ void loginSuccess(const string& login, const string& remId)
|
||||
|
||||
|
||||
template <typename T>
|
||||
static void getMultiPartConnectParameter(T& putTo, Firebird::ClumpletReader& id, UCHAR param)
|
||||
static void getMultiPartConnectParameter(T& putTo, ClumpletReader& id, UCHAR param)
|
||||
{
|
||||
// This array is needed only to make sure that all parts of specific data are present
|
||||
UCHAR checkBytes[256];
|
||||
@ -1211,7 +1211,7 @@ static void release_sql_request(Rsr*);
|
||||
static void release_transaction(Rtr*);
|
||||
|
||||
static void send_error(rem_port* port, PACKET* apacket, ISC_STATUS errcode);
|
||||
static void send_error(rem_port* port, PACKET* apacket, const Firebird::Arg::StatusVector&);
|
||||
static void send_error(rem_port* port, PACKET* apacket, const Arg::StatusVector&);
|
||||
static void set_server(rem_port*, USHORT);
|
||||
static int shut_server(const int, const int, void*);
|
||||
static int pre_shutdown(const int, const int, void*);
|
||||
@ -1367,7 +1367,7 @@ void SRVR_enum_attachments(ULONG& att_cnt, ULONG& dbs_cnt, ULONG& svc_cnt)
|
||||
iface->query(&status, 0, NULL, sizeof(spb_query), spb_query, sizeof(buffer), buffer);
|
||||
const UCHAR* p = buffer;
|
||||
|
||||
if ((!(status.getState() & Firebird::IStatus::STATE_ERRORS)) && *p++ == isc_info_svc_svr_db_info)
|
||||
if ((!(status.getState() & IStatus::STATE_ERRORS)) && *p++ == isc_info_svc_svr_db_info)
|
||||
{
|
||||
while (*p != isc_info_flag_end)
|
||||
{
|
||||
@ -1984,7 +1984,7 @@ static bool accept_connection(rem_port* port, P_CNCT* connect, PACKET* send)
|
||||
|
||||
port->port_client_arch = connect->p_cnct_client;
|
||||
|
||||
Firebird::ClumpletReader id(Firebird::ClumpletReader::UnTagged,
|
||||
ClumpletReader id(ClumpletReader::UnTagged,
|
||||
connect->p_cnct_user_id.cstr_address,
|
||||
connect->p_cnct_user_id.cstr_length);
|
||||
|
||||
@ -2123,7 +2123,7 @@ static bool accept_connection(rem_port* port, P_CNCT* connect, PACKET* send)
|
||||
if (!accepted)
|
||||
{
|
||||
HANDSHAKE_DEBUG(fprintf(stderr, "!accepted, sending reject\n"));
|
||||
if (status.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status.getState() & IStatus::STATE_ERRORS)
|
||||
{
|
||||
switch (status.getErrors()[1])
|
||||
{
|
||||
@ -2516,13 +2516,13 @@ void DatabaseAuth::accept(PACKET* send, Auth::WriterImplementation* authBlock)
|
||||
fb_assert(authPort->port_server_crypt_callback);
|
||||
provider->setDbCryptCallback(&status_vector, authPort->port_server_crypt_callback->getInterface());
|
||||
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
ServAttachment iface(operation == op_attach ?
|
||||
provider->attachDatabase(&status_vector, dbName.c_str(), dl, dpb) :
|
||||
provider->createDatabase(&status_vector, dbName.c_str(), dl, dpb));
|
||||
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
Rdb* rdb = FB_NEW Rdb;
|
||||
|
||||
@ -2583,7 +2583,7 @@ static void aux_request( rem_port* port, /*P_REQ* request,*/ PACKET* send)
|
||||
port->send_response(send, rdb->rdb_id, send->p_resp.p_resp_data.cstr_length,
|
||||
&status_vector, false);
|
||||
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -2783,7 +2783,7 @@ static USHORT check_statement_type( Rsr* statement)
|
||||
|
||||
statement->rsr_iface->getInfo(&local_status, sizeof(sql_info), sql_info, sizeof(buffer), buffer);
|
||||
|
||||
if (!(local_status.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(local_status.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
for (ClumpletReader p(ClumpletReader::InfoResponse, buffer, sizeof(buffer)); !p.isEof(); p.moveNext())
|
||||
{
|
||||
@ -2843,7 +2843,7 @@ ISC_STATUS rem_port::compile(P_CMPL* compileL, PACKET* sendL)
|
||||
|
||||
ServRequest iface(rdb->rdb_iface->compileRequest(&status_vector, blr_length, blr));
|
||||
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
return this->send_response(sendL, 0, 0, &status_vector, false);
|
||||
|
||||
// Parse the request to find the messages
|
||||
@ -3103,7 +3103,7 @@ void rem_port::drop_database(P_RLSE* /*release*/, PACKET* sendL)
|
||||
|
||||
rdb->rdb_iface->dropDatabase(&status_vector);
|
||||
|
||||
if ((status_vector.getState() & Firebird::IStatus::STATE_ERRORS) &&
|
||||
if ((status_vector.getState() & IStatus::STATE_ERRORS) &&
|
||||
(status_vector.getErrors()[1] != isc_drdb_completed_with_errs))
|
||||
{
|
||||
this->send_response(sendL, 0, 0, &status_vector, false);
|
||||
@ -3162,7 +3162,7 @@ ISC_STATUS rem_port::end_blob(P_OP operation, P_RLSE * release, PACKET* sendL)
|
||||
else
|
||||
blob->rbl_iface->cancel(&status_vector);
|
||||
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
blob->rbl_iface = NULL;
|
||||
release_blob(blob);
|
||||
@ -3193,7 +3193,7 @@ ISC_STATUS rem_port::end_database(P_RLSE* /*release*/, PACKET* sendL)
|
||||
|
||||
rdb->rdb_iface->detach(&status_vector);
|
||||
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
return this->send_response(sendL, 0, 0, &status_vector, false);
|
||||
|
||||
port_flags |= PORT_detached;
|
||||
@ -3247,7 +3247,7 @@ ISC_STATUS rem_port::end_request(P_RLSE * release, PACKET* sendL)
|
||||
|
||||
requestL->rrq_iface->free(&status_vector);
|
||||
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
requestL->rrq_iface = NULL;
|
||||
release_request(requestL);
|
||||
@ -3285,7 +3285,7 @@ ISC_STATUS rem_port::end_statement(P_SQLFREE* free_stmt, PACKET* sendL)
|
||||
else if (statement->rsr_cursor)
|
||||
{
|
||||
statement->rsr_cursor->close(&status_vector);
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
{
|
||||
return this->send_response(sendL, 0, 0, &status_vector, true);
|
||||
}
|
||||
@ -3308,7 +3308,7 @@ ISC_STATUS rem_port::end_statement(P_SQLFREE* free_stmt, PACKET* sendL)
|
||||
if (statement->rsr_iface)
|
||||
{
|
||||
statement->rsr_iface->free(&status_vector);
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
{
|
||||
return this->send_response(sendL, 0, 0, &status_vector, true);
|
||||
}
|
||||
@ -3372,12 +3372,12 @@ ISC_STATUS rem_port::end_transaction(P_OP operation, P_RLSE * release, PACKET* s
|
||||
|
||||
case op_prepare:
|
||||
transaction->rtr_iface->prepare(&status_vector, 0, NULL);
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
transaction->rtr_limbo = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
if (operation == op_commit || operation == op_rollback)
|
||||
{
|
||||
@ -3486,11 +3486,11 @@ ISC_STATUS rem_port::execute_immediate(P_OP op, P_SQLST * exnow, PACKET* sendL)
|
||||
|
||||
sendL->p_operation = op_sql_response;
|
||||
sendL->p_sqldata.p_sqldata_messages =
|
||||
((status_vector.getState() & Firebird::IStatus::STATE_ERRORS) || !out_msg) ? 0 : 1;
|
||||
((status_vector.getState() & IStatus::STATE_ERRORS) || !out_msg) ? 0 : 1;
|
||||
this->send_partial(sendL);
|
||||
}
|
||||
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
if (transaction && !newTra)
|
||||
{
|
||||
@ -3580,7 +3580,7 @@ void rem_port::batch_create(P_BATCH_CREATE* batch, PACKET* sendL)
|
||||
|
||||
statement->rsr_batch_size = 0;
|
||||
statement->rsr_batch_stream.blobRemaining = 0;
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
if (msgBuffer.metadata)
|
||||
{
|
||||
@ -3907,7 +3907,7 @@ ISC_STATUS rem_port::execute_statement(P_OP op, P_SQLDATA* sqldata, PACKET* send
|
||||
(out_blr_length ? oMsgBuffer.metadata : DELAYED_OUT_FORMAT),
|
||||
cursorFlags);
|
||||
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
transaction->rtr_cursors.add(statement);
|
||||
statement->rsr_delayed_format = !out_blr_length;
|
||||
@ -3925,12 +3925,12 @@ ISC_STATUS rem_port::execute_statement(P_OP op, P_SQLDATA* sqldata, PACKET* send
|
||||
|
||||
sendL->p_operation = op_sql_response;
|
||||
sendL->p_sqldata.p_sqldata_messages =
|
||||
((status_vector.getState() & Firebird::IStatus::STATE_ERRORS) || !out_msg) ? 0 : 1;
|
||||
((status_vector.getState() & IStatus::STATE_ERRORS) || !out_msg) ? 0 : 1;
|
||||
|
||||
this->send_partial(sendL);
|
||||
}
|
||||
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
if (transaction && !newTra)
|
||||
{
|
||||
@ -4083,7 +4083,7 @@ ISC_STATUS rem_port::fetch(P_SQLDATA * sqldata, PACKET* sendL, bool scroll)
|
||||
const auto message = statement->rsr_buffer;
|
||||
const int rc = cursor->fetchRelative(&status_vector, adjustment, message->msg_buffer);
|
||||
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
return this->send_response(sendL, 0, 0, &status_vector, false);
|
||||
|
||||
// Re-positioning should never fail
|
||||
@ -4204,7 +4204,7 @@ ISC_STATUS rem_port::fetch(P_SQLDATA * sqldata, PACKET* sendL, bool scroll)
|
||||
|
||||
statement->rsr_flags.set(Rsr::FETCHED);
|
||||
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
return this->send_response(sendL, 0, 0, &status_vector, false);
|
||||
|
||||
success = (rc == IStatus::RESULT_OK);
|
||||
@ -4296,7 +4296,7 @@ ISC_STATUS rem_port::fetch(P_SQLDATA * sqldata, PACKET* sendL, bool scroll)
|
||||
fb_assert(false);
|
||||
}
|
||||
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
{
|
||||
// If already have an error queued, don't overwrite it
|
||||
if (!statement->rsr_flags.test(Rsr::STREAM_ERR))
|
||||
@ -4348,7 +4348,7 @@ static bool get_next_msg_no(Rrq* request, USHORT incarnation, USHORT * msg_numbe
|
||||
request->rrq_iface->getInfo(&status_vector, incarnation,
|
||||
sizeof(request_info), request_info, sizeof(info_buffer), info_buffer);
|
||||
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
return false;
|
||||
|
||||
bool result = false;
|
||||
@ -4500,7 +4500,7 @@ ISC_STATUS rem_port::get_slice(P_SLC * stuff, PACKET* sendL)
|
||||
stuff->p_slc_parameters.cstr_address, stuff->p_slc_length, slice);
|
||||
|
||||
ISC_STATUS status;
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
status = this->send_response(sendL, 0, 0, &status_vector, false);
|
||||
else
|
||||
{
|
||||
@ -4593,7 +4593,7 @@ void rem_port::info(P_OP op, P_INFO* stuff, PACKET* sendL)
|
||||
buffer_length, //sizeof(temp)
|
||||
temp_buffer); //temp
|
||||
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
string version;
|
||||
versionInfo(version);
|
||||
@ -4774,7 +4774,7 @@ ISC_STATUS rem_port::open_blob(P_OP op, P_BLOB* stuff, PACKET* sendL)
|
||||
&sendL->p_resp.p_resp_blob_id, bpb_length, bpb));
|
||||
|
||||
USHORT object = 0;
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
Rbl* blob = FB_NEW Rbl;
|
||||
#ifdef DEBUG_REMOTE_MEMORY
|
||||
@ -4821,7 +4821,7 @@ ISC_STATUS rem_port::prepare(P_PREP * stuff, PACKET* sendL)
|
||||
|
||||
transaction->rtr_iface->prepare(&status_vector,
|
||||
stuff->p_prep_data.cstr_length, stuff->p_prep_data.cstr_address);
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
transaction->rtr_limbo = true;
|
||||
}
|
||||
@ -4872,7 +4872,7 @@ ISC_STATUS rem_port::prepare_statement(P_SQLST * prepareL, PACKET* sendL)
|
||||
if (statement->rsr_iface)
|
||||
{
|
||||
statement->rsr_iface->free(&status_vector);
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
return this->send_response(sendL, 0, 0, &status_vector, false);
|
||||
}
|
||||
|
||||
@ -4888,13 +4888,13 @@ ISC_STATUS rem_port::prepare_statement(P_SQLST * prepareL, PACKET* sendL)
|
||||
iface, prepareL->p_sqlst_SQL_str.cstr_length,
|
||||
reinterpret_cast<const char*>(prepareL->p_sqlst_SQL_str.cstr_address),
|
||||
prepareL->p_sqlst_SQL_dialect, flags);
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
return this->send_response(sendL, 0, 0, &status_vector, false);
|
||||
|
||||
LocalStatus ls2;
|
||||
CheckStatusWrapper s2(&ls2);
|
||||
statement->rsr_iface->getInfo(&s2, infoLength, info, prepareL->p_sqlst_buffer_length, buffer);
|
||||
if (s2.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (s2.getState() & IStatus::STATE_ERRORS)
|
||||
return this->send_response(sendL, 0, 0, &s2, false);
|
||||
|
||||
REMOTE_reset_statement(statement);
|
||||
@ -5411,7 +5411,7 @@ ISC_STATUS rem_port::put_segment(P_OP op, P_SGMT * segment, PACKET* sendL)
|
||||
length += *p++ << 8;
|
||||
blob->rbl_iface->putSegment(&status_vector, length, p);
|
||||
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
return this->send_response(sendL, 0, 0, &status_vector, false);
|
||||
p += length;
|
||||
}
|
||||
@ -5543,7 +5543,7 @@ ISC_STATUS rem_port::receive_after_start(P_DATA* data, PACKET* sendL, IStatus* s
|
||||
response->p_resp_data.cstr_length = 0;
|
||||
|
||||
if (!sendL->p_resp.p_resp_status_vector)
|
||||
sendL->p_resp.p_resp_status_vector = FB_NEW_POOL(*getDefaultMemoryPool()) Firebird::DynamicStatusVector();
|
||||
sendL->p_resp.p_resp_status_vector = FB_NEW_POOL(*getDefaultMemoryPool()) DynamicStatusVector();
|
||||
|
||||
sendL->p_resp.p_resp_status_vector->load(status_vector);
|
||||
|
||||
@ -5633,7 +5633,7 @@ ISC_STATUS rem_port::receive_msg(P_DATA * data, PACKET* sendL)
|
||||
requestL->rrq_iface->receive(&status_vector, level,
|
||||
msg_number, format->fmt_length, message->msg_buffer);
|
||||
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
return this->send_response(sendL, 0, 0, &status_vector, false);
|
||||
|
||||
message->msg_address = message->msg_buffer;
|
||||
@ -5714,7 +5714,7 @@ ISC_STATUS rem_port::receive_msg(P_DATA * data, PACKET* sendL)
|
||||
|
||||
// Did we have an error? If so, save it for later delivery
|
||||
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
{
|
||||
// If already have an error queued, don't overwrite it
|
||||
|
||||
@ -5995,7 +5995,7 @@ ISC_STATUS rem_port::send_msg(P_DATA * data, PACKET* sendL)
|
||||
}
|
||||
|
||||
|
||||
ISC_STATUS rem_port::send_response(PACKET* p, OBJCT obj, ULONG length, const Firebird::IStatus* status, bool defer_flag)
|
||||
ISC_STATUS rem_port::send_response(PACKET* p, OBJCT obj, ULONG length, const IStatus* status, bool defer_flag)
|
||||
{
|
||||
StaticStatusVector tmp;
|
||||
tmp.mergeStatus(status);
|
||||
@ -6024,7 +6024,7 @@ ISC_STATUS rem_port::send_response( PACKET* sendL,
|
||||
|
||||
// Start by translating the status vector into "generic" form
|
||||
|
||||
Firebird::StaticStatusVector new_vector;
|
||||
StaticStatusVector new_vector;
|
||||
const ISC_STATUS* old_vector = status_vector;
|
||||
const ISC_STATUS exit_code = old_vector[1];
|
||||
|
||||
@ -6103,7 +6103,7 @@ ISC_STATUS rem_port::send_response( PACKET* sendL,
|
||||
// of the response packet may contain valid data. Don't trash them.
|
||||
|
||||
if (!response->p_resp_status_vector)
|
||||
response->p_resp_status_vector = FB_NEW_POOL(*getDefaultMemoryPool()) Firebird::DynamicStatusVector();
|
||||
response->p_resp_status_vector = FB_NEW_POOL(*getDefaultMemoryPool()) DynamicStatusVector();
|
||||
|
||||
response->p_resp_status_vector->save(new_vector.begin());
|
||||
|
||||
@ -6142,7 +6142,7 @@ static void send_error(rem_port* port, PACKET* apacket, ISC_STATUS errcode)
|
||||
}
|
||||
|
||||
// Maybe this can be a member of rem_port?
|
||||
static void send_error(rem_port* port, PACKET* apacket, const Firebird::Arg::StatusVector& err)
|
||||
static void send_error(rem_port* port, PACKET* apacket, const Arg::StatusVector& err)
|
||||
{
|
||||
LocalStatus ls;
|
||||
CheckStatusWrapper status_vector(&ls);
|
||||
@ -6235,13 +6235,13 @@ ISC_STATUS rem_port::service_attach(const char* service_name,
|
||||
fb_assert(port_server_crypt_callback);
|
||||
provider->setDbCryptCallback(&status_vector, port_server_crypt_callback->getInterface());
|
||||
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
dumpAuthBlock("rem_port::service_attach()", spb, isc_spb_auth_block);
|
||||
ServService iface(provider->attachServiceManager(&status_vector, service_name,
|
||||
(ULONG) spb->getBufferLength(), spb->getBuffer()));
|
||||
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
Rdb* rdb = FB_NEW Rdb;
|
||||
|
||||
@ -6284,7 +6284,7 @@ ISC_STATUS rem_port::service_end(P_RLSE* /*release*/, PACKET* sendL)
|
||||
RefMutexGuard portGuard(*port_cancel_sync, FB_FUNCTION);
|
||||
rdb->rdb_svc->svc_iface->detach(&status_vector);
|
||||
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
port_flags |= PORT_detached;
|
||||
rdb->rdb_svc->svc_iface = NULL;
|
||||
@ -6552,7 +6552,7 @@ ISC_STATUS rem_port::start(P_OP operation, P_DATA * data, PACKET* sendL)
|
||||
|
||||
requestL->rrq_iface->start(&status_vector, transaction->rtr_iface, data->p_data_incarnation);
|
||||
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
requestL->rrq_rtr = transaction;
|
||||
if (operation == op_start_and_receive)
|
||||
@ -6599,7 +6599,7 @@ ISC_STATUS rem_port::start_and_send(P_OP operation, P_DATA* data, PACKET* sendL)
|
||||
transaction->rtr_iface, data->p_data_incarnation,
|
||||
number, format->fmt_length, message->msg_address);
|
||||
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
requestL->rrq_rtr = transaction;
|
||||
if (operation == op_start_send_and_receive)
|
||||
@ -6636,7 +6636,7 @@ ISC_STATUS rem_port::start_transaction(P_OP operation, P_STTR * stuff, PACKET* s
|
||||
stuff->p_sttr_tpb.cstr_length, stuff->p_sttr_tpb.cstr_address));
|
||||
|
||||
OBJCT object = 0;
|
||||
if (!(status_vector.getState() & Firebird::IStatus::STATE_ERRORS))
|
||||
if (!(status_vector.getState() & IStatus::STATE_ERRORS))
|
||||
{
|
||||
Rtr* transaction = make_transaction(rdb, iface);
|
||||
if (transaction)
|
||||
@ -6994,7 +6994,7 @@ ISC_STATUS rem_port::transact_request(P_TRRQ* trrq, PACKET* sendL)
|
||||
rdb->rdb_iface->transactRequest(&status_vector, transaction->rtr_iface,
|
||||
blr_length, blr, in_msg_length, in_msg, out_msg_length, out_msg);
|
||||
|
||||
if (status_vector.getState() & Firebird::IStatus::STATE_ERRORS)
|
||||
if (status_vector.getState() & IStatus::STATE_ERRORS)
|
||||
return this->send_response(sendL, 0, 0, &status_vector, false);
|
||||
|
||||
P_DATA* data = &sendL->p_data;
|
||||
@ -7250,12 +7250,12 @@ bool SrvAuthBlock::authCompleted(bool flag)
|
||||
return flComplete;
|
||||
}
|
||||
|
||||
void SrvAuthBlock::setLogin(const Firebird::string& user)
|
||||
void SrvAuthBlock::setLogin(const string& user)
|
||||
{
|
||||
userName = user;
|
||||
}
|
||||
|
||||
void SrvAuthBlock::load(Firebird::ClumpletReader& id)
|
||||
void SrvAuthBlock::load(ClumpletReader& id)
|
||||
{
|
||||
if (id.find(CNCT_login))
|
||||
{
|
||||
@ -7290,12 +7290,12 @@ const char* SrvAuthBlock::getPluginName()
|
||||
return pluginName.nullStr();
|
||||
}
|
||||
|
||||
void SrvAuthBlock::setPluginName(const Firebird::string& name)
|
||||
void SrvAuthBlock::setPluginName(const string& name)
|
||||
{
|
||||
pluginName = name.ToPathName();
|
||||
}
|
||||
|
||||
void SrvAuthBlock::setPluginList(const Firebird::string& list)
|
||||
void SrvAuthBlock::setPluginList(const string& list)
|
||||
{
|
||||
if (firstTime)
|
||||
{
|
||||
@ -7307,7 +7307,7 @@ void SrvAuthBlock::setPluginList(const Firebird::string& list)
|
||||
}
|
||||
}
|
||||
|
||||
void SrvAuthBlock::setDataForPlugin(const Firebird::UCharBuffer& data)
|
||||
void SrvAuthBlock::setDataForPlugin(const UCharBuffer& data)
|
||||
{
|
||||
dataForPlugin.assign(data.begin(), data.getCount());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user