From: <asf...@us...> - 2010-10-12 17:40:35
|
Revision: 51662 http://firebird.svn.sourceforge.net/firebird/?rev=51662&view=rev Author: asfernandes Date: 2010-10-12 17:40:27 +0000 (Tue, 12 Oct 2010) Log Message: ----------- Misc Modified Paths: -------------- firebird/trunk/builds/posix/make.defaults firebird/trunk/src/auth/SecurityDatabase/jrd_pwd.h firebird/trunk/src/auth/SecurityDatabase/pwd.cpp firebird/trunk/src/common/StatusHolder.h firebird/trunk/src/common/classes/alloc.cpp firebird/trunk/src/common/os/posix/isc_ipc.cpp firebird/trunk/src/dsql/dsql.cpp firebird/trunk/src/dsql/dsql.h firebird/trunk/src/dsql/node.h firebird/trunk/src/dsql/utld_proto.h firebird/trunk/src/include/ProviderInterface.h firebird/trunk/src/include/fb_exception.h firebird/trunk/src/jrd/Attachment.h firebird/trunk/src/jrd/evl.cpp firebird/trunk/src/jrd/extds/InternalDS.cpp firebird/trunk/src/jrd/flu.cpp firebird/trunk/src/jrd/jrd.cpp firebird/trunk/src/jrd/jrd_proto.h firebird/trunk/src/jrd/tra.h firebird/trunk/src/jrd/trace/TraceManager.cpp firebird/trunk/src/remote/client/interface.cpp firebird/trunk/src/remote/inet.cpp firebird/trunk/src/remote/protocol.h firebird/trunk/src/remote/remote.cpp firebird/trunk/src/remote/server/os/posix/inet_server.cpp firebird/trunk/src/yvalve/prepa_proto.h firebird/trunk/src/yvalve/why.cpp firebird/trunk/src/yvalve/why_proto.h Modified: firebird/trunk/builds/posix/make.defaults =================================================================== --- firebird/trunk/builds/posix/make.defaults 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/builds/posix/make.defaults 2010-10-12 17:40:27 UTC (rev 51662) @@ -91,9 +91,8 @@ #____________________________________________________________________________ +# If this is defined then we use special rules useful for developers only IsDeveloper = @DEVEL_FLG@ - # If this is defined then we use special rules - # useful for developers only CpuType=@CPU_TYPE@ Modified: firebird/trunk/src/auth/SecurityDatabase/jrd_pwd.h =================================================================== --- firebird/trunk/src/auth/SecurityDatabase/jrd_pwd.h 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/auth/SecurityDatabase/jrd_pwd.h 2010-10-12 17:40:27 UTC (rev 51662) @@ -117,7 +117,6 @@ class SecurityDatabaseServerInstance : public ServerInstance { public: - Result startAuthentication(bool isService, const char* dbName, const unsigned char* dpb, unsigned int dpbSize, WriterInterface* writerInterface); Modified: firebird/trunk/src/auth/SecurityDatabase/pwd.cpp =================================================================== --- firebird/trunk/src/auth/SecurityDatabase/pwd.cpp 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/auth/SecurityDatabase/pwd.cpp 2010-10-12 17:40:27 UTC (rev 51662) @@ -75,6 +75,7 @@ } break; } + return 0; } @@ -113,6 +114,7 @@ Thread::start(threadTimer, 0, 0); fb_shutdown_callback(0, stopTimer, fb_shut_preproviders | fb_shut_finish, 0); } + return 1; } @@ -125,6 +127,7 @@ { cnt = 1; } + toRun = function; } @@ -213,11 +216,13 @@ void SecurityDatabase::fini() { MutexLockGuard guard(mutex); + if (lookup_req) { isc_release_request(status, &lookup_req); checkStatus("isc_release_request"); } + if (lookup_db) { isc_detach_database(status, &lookup_db); @@ -271,7 +276,9 @@ if (!user.flag || status[1]) break; + found = true; + if (pwd) { strncpy(pwd, user.password, MAX_PASSWORD_LENGTH); @@ -321,6 +328,7 @@ // ignore status returned in order to keep first error isc_detach_database(localStatus, &lookup_db); } + checkStatus("isc_compile_request", isc_psw_attach); } @@ -333,6 +341,7 @@ ClumpletReader& originalDpb) { static AmCache useNative = AM_UNKNOWN; + if (useNative == AM_UNKNOWN) { // We use PathName for string comparison using platform filename comparison @@ -340,12 +349,14 @@ const PathName authMethod(Config::getAuthMethod()); useNative = (authMethod == AmNative || authMethod == AmMixed) ? AM_ENABLED : AM_DISABLED; } + if (useNative == AM_DISABLED) { return AUTH_CONTINUE; } string login, password, passwordEnc; + for (originalDpb.rewind(); !originalDpb.isEof(); originalDpb.moveNext()) { switch (originalDpb.getClumpTag()) Modified: firebird/trunk/src/common/StatusHolder.h =================================================================== --- firebird/trunk/src/common/StatusHolder.h 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/common/StatusHolder.h 2010-10-12 17:40:27 UTC (rev 51662) @@ -72,7 +72,7 @@ ISC_STATUS vector[40]; // FixMe - may be a kind of dynamic storage will be better? }; -class LocalStatus : public Firebird::BaseStatus +class LocalStatus : public BaseStatus { public: virtual void release() Modified: firebird/trunk/src/common/classes/alloc.cpp =================================================================== --- firebird/trunk/src/common/classes/alloc.cpp 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/common/classes/alloc.cpp 2010-10-12 17:40:27 UTC (rev 51662) @@ -149,11 +149,13 @@ defaultMemoryManager->~MemoryPool(); defaultMemoryManager = NULL; } + if (default_stats_group) { default_stats_group->~MemoryStats(); default_stats_group = NULL; } + if (cache_mutex) { cache_mutex->~Mutex(); Modified: firebird/trunk/src/common/os/posix/isc_ipc.cpp =================================================================== --- firebird/trunk/src/common/os/posix/isc_ipc.cpp 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/common/os/posix/isc_ipc.cpp 2010-10-12 17:40:27 UTC (rev 51662) @@ -119,7 +119,7 @@ public: Firebird::Mutex mutex; - explicit SignalMutex(Firebird::MemoryPool&) + explicit SignalMutex(Firebird::MemoryPool&) { sigActive = true; } @@ -128,7 +128,7 @@ Firebird::MutexLockGuard guard(mutex); sigActive = false; - for (SIG sig = signals; sig;) + for (SIG sig = signals; sig;) { SIG sig2 = sig; sig = sig->sig_next; Modified: firebird/trunk/src/dsql/dsql.cpp =================================================================== --- firebird/trunk/src/dsql/dsql.cpp 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/dsql/dsql.cpp 2010-10-12 17:40:27 UTC (rev 51662) @@ -1292,7 +1292,7 @@ if (node->nod_type == nod_constant) return (SSHORT) node->getSlong(); - const dsql_par* parameter = (dsql_par*) ExprNode::as<ParameterNode>(node)->dsqlParameter; + const dsql_par* parameter = ExprNode::as<ParameterNode>(node)->dsqlParameter; const dsql_par* null = parameter->par_null; dsc desc; Modified: firebird/trunk/src/dsql/dsql.h =================================================================== --- firebird/trunk/src/dsql/dsql.h 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/dsql/dsql.h 2010-10-12 17:40:27 UTC (rev 51662) @@ -602,7 +602,7 @@ unsigned int msg_type, unsigned int msg_length, unsigned char* message); // returns 100 if EOF, 101 if fragmented // virtual void insert(Status* status, Sqlda* in); - virtual void insertMessage(Status* status, + virtual void insertMessage(Status* status, unsigned int blr_length, const unsigned char* blr, unsigned int msg_type, unsigned int msg_length, const unsigned char* message); Modified: firebird/trunk/src/dsql/node.h =================================================================== --- firebird/trunk/src/dsql/node.h 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/dsql/node.h 2010-10-12 17:40:27 UTC (rev 51662) @@ -255,8 +255,7 @@ * e_<nodename>_count == count of arguments in nod_arg * This is often used as the count of sub-nodes, but there * are cases when non-DSQL_NOD arguments are stuffed into nod_arg - * entries. These include nod_udf, nod_cast, - * & nod_collate. + * entries. These include nod_udf, nod_cast and nod_collate. */ enum node_args { e_select_expr = 0, // nod_select Modified: firebird/trunk/src/dsql/utld_proto.h =================================================================== --- firebird/trunk/src/dsql/utld_proto.h 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/dsql/utld_proto.h 2010-10-12 17:40:27 UTC (rev 51662) @@ -30,5 +30,4 @@ USHORT UTLD_char_length_to_byte_length(USHORT lengthInChars, USHORT maxBytesPerChar); ISC_STATUS UTLD_copy_status(const ISC_STATUS*, ISC_STATUS*); - #endif // DSQL_UTLD_PROTO_H Modified: firebird/trunk/src/include/ProviderInterface.h =================================================================== --- firebird/trunk/src/include/ProviderInterface.h 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/include/ProviderInterface.h 2010-10-12 17:40:27 UTC (rev 51662) @@ -152,7 +152,7 @@ unsigned int msg_type, unsigned int msg_length, unsigned char* message) = 0; // returns 100 if EOF, 101 if fragmented // virtual void insert(Status* status, Sqlda* in) = 0; - virtual void insertMessage(Status* status, + virtual void insertMessage(Status* status, unsigned int blr_length, const unsigned char* blr, unsigned int msg_type, unsigned int msg_length, const unsigned char* message) = 0; @@ -190,7 +190,7 @@ unsigned int bufferLength, unsigned char* buffer) = 0; // virtual Transaction* startTransaction(Status* status, unsigned int tpbLength, const unsigned char* tpb) = 0; // second form is tmp - not to rewrite external engines right now - virtual Transaction* startTransaction(Status* status, unsigned int tpbLength, const unsigned char* tpb, + virtual Transaction* startTransaction(Status* status, unsigned int tpbLength, const unsigned char* tpb, FB_API_HANDLE api) = 0; virtual Transaction* reconnectTransaction(Status* status, unsigned int length, const unsigned char* id) = 0; virtual Statement* allocateStatement(Status* status) = 0; Modified: firebird/trunk/src/include/fb_exception.h =================================================================== --- firebird/trunk/src/include/fb_exception.h 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/include/fb_exception.h 2010-10-12 17:40:27 UTC (rev 51662) @@ -148,8 +148,8 @@ // Serialize exception into status_vector -ISC_STATUS stuff_exception(ISC_STATUS *status_vector, const Firebird::Exception& ex) throw(); -ISC_STATUS stuff_exception(FbApi::Status *status, const Firebird::Exception& ex) throw(); +ISC_STATUS stuff_exception(ISC_STATUS* status_vector, const Firebird::Exception& ex) throw(); +ISC_STATUS stuff_exception(FbApi::Status* status, const Firebird::Exception& ex) throw(); // Put status vector strings into strings buffer void makePermanentVector(ISC_STATUS* perm, const ISC_STATUS* trans, FB_THREAD_ID thr = getThreadId()) throw(); Modified: firebird/trunk/src/jrd/Attachment.h =================================================================== --- firebird/trunk/src/jrd/Attachment.h 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/jrd/Attachment.h 2010-10-12 17:40:27 UTC (rev 51662) @@ -226,12 +226,12 @@ unsigned int bufferLength, unsigned char* buffer); // virtual FbApi::Transaction* startTransaction(Status* status, unsigned int tpbLength, const unsigned char* tpb); // second form is tmp - not to rewrite external engines right now - virtual FbApi::Transaction* startTransaction(Status* status, unsigned int tpbLength, const unsigned char* tpb, + virtual FbApi::Transaction* startTransaction(Status* status, unsigned int tpbLength, const unsigned char* tpb, FB_API_HANDLE api); virtual FbApi::Transaction* reconnectTransaction(Status* status, unsigned int length, const unsigned char* id); virtual FbApi::Statement* allocateStatement(Status* status); virtual FbApi::Request* compileRequest(Status* status, unsigned int blr_length, const unsigned char* blr); - virtual FbApi::Transaction* execute(Status* status, FbApi::Transaction* transaction, + virtual FbApi::Transaction* execute(Status* status, FbApi::Transaction* transaction, unsigned int length, const char* string, unsigned int dialect, unsigned int in_blr_length, const unsigned char* in_blr, unsigned int in_msg_type, unsigned int in_msg_length, const unsigned char* in_msg, Modified: firebird/trunk/src/jrd/evl.cpp =================================================================== --- firebird/trunk/src/jrd/evl.cpp 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/jrd/evl.cpp 2010-10-12 17:40:27 UTC (rev 51662) @@ -220,6 +220,7 @@ default: BUGCHECK(229); // msg 229 EVL_assign_to: invalid operation } + return NULL; } Modified: firebird/trunk/src/jrd/extds/InternalDS.cpp =================================================================== --- firebird/trunk/src/jrd/extds/InternalDS.cpp 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/jrd/extds/InternalDS.cpp 2010-10-12 17:40:27 UTC (rev 51662) @@ -117,7 +117,9 @@ { public: IntStatus(ISC_STATUS *p) - : LocalStatus(), v(p) { } + : LocalStatus(), v(p) + {} + ~IntStatus() { if (v) @@ -126,6 +128,7 @@ fb_utils::copyStatus(v, ISC_STATUS_LENGTH, s, fb_utils::statusLength(s)); } } + private: ISC_STATUS *v; }; @@ -163,9 +166,10 @@ currentProvider()->attachDatabase(&a, &status, 0, m_dbName.c_str(), m_dpb.getBufferLength(), m_dpb.getBuffer()); } - if (!status.isSuccess()) { + + if (!status.isSuccess()) raise(status, tdbb, "attach"); - } + m_attachment = reinterpret_cast<Jrd::Attachment*>(a); } @@ -196,6 +200,7 @@ { status.init(); } + if (!status.isSuccess()) { m_attachment = att; @@ -359,6 +364,7 @@ jrd_tra* tran = getIntTransaction()->getJrdTran(); LocalStatus status; + if (!m_request) { fb_assert(!m_allocated); @@ -366,9 +372,9 @@ m_request = reinterpret_cast<Jrd::dsql_req*>(att->allocateStatement(&status)); m_allocated = (m_request != 0); } - if (!status.isSuccess()) { + + if (!status.isSuccess()) raise(status, tdbb, "jrd8_allocate_statement", &sql); - } { EngineCallbackGuard guard(tdbb, *this); @@ -403,14 +409,14 @@ } m_request = reinterpret_cast<Jrd::dsql_req*>(m_request-> - prepare(&status, tran, sql.length(), sql.c_str(), + prepare(&status, tran, sql.length(), sql.c_str(), m_connection.getSqlDialect(), 0, NULL, 0, NULL)); tran->tra_caller_name = save_caller_name; } - if (!status.isSuccess()) { + + if (!status.isSuccess()) raise(status, tdbb, "jrd8_prepare", &sql); - } const DsqlCompiledStatement* statement = m_request->getStatement(); @@ -495,9 +501,8 @@ 0, m_out_buffer.getCount(), m_out_buffer.begin()); } - if (!status.isSuccess()) { + if (!status.isSuccess()) raise(status, tdbb, "jrd8_execute"); - } } @@ -514,9 +519,8 @@ 0, NULL, 0, 0, NULL); } - if (!status.isSuccess()) { + if (!status.isSuccess()) raise(status, tdbb, "jrd8_execute"); - } } @@ -530,9 +534,9 @@ m_outBlr.getCount(), m_outBlr.begin(), 0, m_out_buffer.getCount(), m_out_buffer.begin()); } - if (!status.isSuccess()) { + + if (!status.isSuccess()) raise(status, tdbb, "jrd8_fetch"); - } return (res != 100); } @@ -550,6 +554,7 @@ m_request = NULL; } } + if (!status.isSuccess()) { m_allocated = m_request = 0; @@ -609,12 +614,13 @@ USHORT bpb_len = bpb ? bpb->getCount() : 0; const UCHAR* bpb_buff = bpb ? bpb->begin() : NULL; - m_blob = reinterpret_cast<Jrd::blb*>(transaction-> - openBlob(&status, &m_blob_id, bpb_len, bpb_buff, att)); + m_blob = reinterpret_cast<Jrd::blb*>( + transaction->openBlob(&status, &m_blob_id, bpb_len, bpb_buff, att)); } - if (!status.isSuccess()) { + + if (!status.isSuccess()) m_connection.raise(status, tdbb, "jrd8_open_blob2"); - } + fb_assert(m_blob); } @@ -638,9 +644,10 @@ bpb_len, bpb_buff, att)); memcpy(desc.dsc_address, &m_blob_id, sizeof(m_blob_id)); } - if (!status.isSuccess()) { + + if (!status.isSuccess()) m_connection.raise(status, tdbb, "jrd8_create_blob2"); - } + fb_assert(m_blob); } @@ -654,6 +661,7 @@ EngineCallbackGuard guard(tdbb, m_connection); result = m_blob->getSegment(&status, len, buff); } + switch (status.get()[1]) { case isc_segstr_eof: @@ -678,9 +686,9 @@ EngineCallbackGuard guard(tdbb, m_connection); m_blob->putSegment(&status, len, buff); } - if (!status.isSuccess()) { + + if (!status.isSuccess()) m_connection.raise(status, tdbb, "jrd8_put_segment"); - } } void InternalBlob::close(thread_db* tdbb) @@ -691,9 +699,10 @@ EngineCallbackGuard guard(tdbb, m_connection); m_blob->close(&status); } - if (!status.isSuccess()) { + + if (!status.isSuccess()) m_connection.raise(status, tdbb, "jrd8_close_blob"); - } + fb_assert(!m_blob); } @@ -708,9 +717,10 @@ EngineCallbackGuard guard(tdbb, m_connection); m_blob->cancel(&status); } - if (!status.isSuccess()) { + + if (!status.isSuccess()) m_connection.raise(status, tdbb, "jrd8_cancel_blob"); - } + fb_assert(!m_blob); } Modified: firebird/trunk/src/jrd/flu.cpp =================================================================== --- firebird/trunk/src/jrd/flu.cpp 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/jrd/flu.cpp 2010-10-12 17:40:27 UTC (rev 51662) @@ -139,6 +139,7 @@ { initialize(); } + ~UdfDirectoryList() { printf("Destroyed directory list\n"); Modified: firebird/trunk/src/jrd/jrd.cpp =================================================================== --- firebird/trunk/src/jrd/jrd.cpp 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/jrd/jrd.cpp 2010-10-12 17:40:27 UTC (rev 51662) @@ -419,6 +419,7 @@ { currentProvider()->shutdown(5000, fb_shutrsn_exit_called); } + UnloadHandler() { InstanceControl::registerShutdown(atExitShutdown); @@ -803,7 +804,7 @@ // Clear the status vector if it doesn't contain a warning if (status[0] != isc_arg_gds || status[1] != FB_SUCCESS || status[2] != isc_arg_warning) { -/* if (return_code != FB_SUCCESS) + /*if (return_code != FB_SUCCESS) { s->set(Arg::Gds(return_code).value()); } @@ -831,8 +832,10 @@ return vector->get()[1]; } - ISC_STATUS* const vectorStart = const_cast<ISC_STATUS*>(vector->get()); // OK as long as we do not change vectors length - // for current way of keeping strings in vector! + // OK as long as we do not change vectors length + // for current way of keeping strings in vector! + + ISC_STATUS* const vectorStart = const_cast<ISC_STATUS*>(vector->get()); ISC_STATUS* status = vectorStart; Array<UCHAR*> buffers; @@ -999,9 +1002,9 @@ bool invalid_client_SQL_dialect = false; PathName file_name, expanded_name; bool is_alias = false; + try { - // Process database parameter block options.get(dpb, dpb_length, invalid_client_SQL_dialect); @@ -1082,8 +1085,8 @@ bool initing_security = false; - try { - + try + { // If database to be opened is security database, then only // gsec or SecurityDatabase may open it. This protects from use // of old gsec to write wrong password hashes into it. @@ -1915,7 +1918,7 @@ FbApi::Request* Attachment::compileRequest(Status* user_status, - unsigned int blr_length, const unsigned char* blr) + unsigned int blr_length, const unsigned char* blr) { /************************************** * @@ -1927,6 +1930,7 @@ * **************************************/ JrdStatement* stmt = NULL; + try { ThreadContextHolder tdbb(user_status); @@ -1968,13 +1972,13 @@ } successful_completion(user_status); + return stmt; } FbApi::Blob* jrd_tra::createBlob(Status* user_status, ISC_QUAD* blob_id, - unsigned int bpb_length, const unsigned char* bpb, - FbApi::Attachment* apiAtt) + unsigned int bpb_length, const unsigned char* bpb, FbApi::Attachment* apiAtt) { /************************************** * @@ -1987,6 +1991,7 @@ * **************************************/ blb* blob = NULL; + try { ThreadContextHolder tdbb(user_status); @@ -2018,12 +2023,14 @@ } successful_completion(user_status); + return blob; } -void Provider::createDatabase(FbApi::Attachment** handle, Status* user_status, FB_API_HANDLE public_handle, - const char* filename, unsigned int dpb_length, const unsigned char* dpb) +void Provider::createDatabase(FbApi::Attachment** handle, Status* user_status, + FB_API_HANDLE public_handle, const char* filename, unsigned int dpb_length, + const unsigned char* dpb) { /************************************** * @@ -2382,13 +2389,13 @@ { ex.stuffException(user_status); } + *handle = NULL; } -void Attachment::getInfo(Status* user_status, - unsigned int item_length, const unsigned char* items, - unsigned int buffer_length, unsigned char* buffer) +void Attachment::getInfo(Status* user_status, unsigned int item_length, const unsigned char* items, + unsigned int buffer_length, unsigned char* buffer) { /************************************** * @@ -2656,7 +2663,7 @@ * Abort a partially completed blob. * **************************************/ - unsigned int l = 0; + unsigned int len = 0; try { @@ -2668,36 +2675,34 @@ try { - l = BLB_get_segment(tdbb, this, buffer, buffer_length); + len = BLB_get_segment(tdbb, this, buffer, buffer_length); - if (blb_flags & BLB_eof) { + if (blb_flags & BLB_eof) status_exception::raise(Arg::Gds(isc_segstr_eof)); - } - else if (blb_fragment_size) { + else if (blb_fragment_size) status_exception::raise(Arg::Gds(isc_segment)); - } } catch (const Exception& ex) { transliterateException(tdbb, ex, user_status); - return l; + return len; } } catch (const Exception& ex) { ex.stuffException(user_status); - return l; + return len; } successful_completion(user_status); - return l; + + return len; } -int jrd_tra::getSlice(Status* user_status, ISC_QUAD* array_id, - unsigned int /*sdl_length*/, const unsigned char* sdl, - unsigned int param_length, const unsigned char* param, - int slice_length, unsigned char* slice, FbApi::Attachment* apiAtt) +int jrd_tra::getSlice(Status* user_status, ISC_QUAD* array_id, unsigned int /*sdl_length*/, + const unsigned char* sdl, unsigned int param_length, const unsigned char* param, + int slice_length, unsigned char* slice, FbApi::Attachment* apiAtt) { /************************************** * @@ -2729,9 +2734,7 @@ jrd_tra* const transaction = find_transaction(tdbb, isc_segstr_wrong_db); if (!array_id->gds_quad_low && !array_id->gds_quad_high) - { MOVE_CLEAR(slice, slice_length); - } else { return_length = BLB_get_slice(tdbb, transaction, reinterpret_cast<bid*>(array_id), @@ -2751,13 +2754,13 @@ } successful_completion(user_status); + return return_length; } -FbApi::Blob* jrd_tra::openBlob(Status* user_status, ISC_QUAD* blob_id, - unsigned int bpb_length, const unsigned char* bpb, - FbApi::Attachment* apiAtt) +FbApi::Blob* jrd_tra::openBlob(Status* user_status, ISC_QUAD* blob_id, unsigned int bpb_length, + const unsigned char* bpb, FbApi::Attachment* apiAtt) { /************************************** * @@ -2769,7 +2772,7 @@ * Open an existing blob. * **************************************/ - blb *blob = NULL; + blb* blob = NULL; try { @@ -2803,12 +2806,12 @@ } successful_completion(user_status); + return blob; } -void jrd_tra::prepare(Status* user_status, - unsigned int msg_length, const unsigned char* msg) +void jrd_tra::prepare(Status* user_status, unsigned int msg_length, const unsigned char* msg) { /************************************** * @@ -2846,7 +2849,6 @@ } successful_completion(user_status); - return; } @@ -2890,11 +2892,9 @@ } -void jrd_tra::putSlice(Status* user_status, ISC_QUAD* array_id, - unsigned int /*sdlLength*/, const unsigned char* sdl, - unsigned int paramLength, const unsigned char* param, - int sliceLength, unsigned char* slice, - FbApi::Attachment* apiAtt) +void jrd_tra::putSlice(Status* user_status, ISC_QUAD* array_id, unsigned int /*sdlLength*/, + const unsigned char* sdl, unsigned int paramLength, const unsigned char* param, + int sliceLength, unsigned char* slice, FbApi::Attachment* apiAtt) { /************************************** * @@ -2943,7 +2943,7 @@ FbApi::Events* Attachment::queEvents(Status* user_status, FbApi::EventCallback* callback, - unsigned int length, const unsigned char* events) + unsigned int length, const unsigned char* events) { /************************************** * @@ -2990,6 +2990,7 @@ } successful_completion(user_status); + return ev; } @@ -3038,9 +3039,8 @@ } -FbApi::Transaction* Attachment::reconnectTransaction(Status* user_status, - unsigned int length, - const unsigned char* id) +FbApi::Transaction* Attachment::reconnectTransaction(Status* user_status, unsigned int length, + const unsigned char* id) { /************************************** * @@ -3079,6 +3079,7 @@ } successful_completion(user_status); + return tra; } @@ -3123,9 +3124,8 @@ } -void JrdStatement::getInfo(Status* user_status, int level, - unsigned int itemsLength, const unsigned char* items, - unsigned int bufferLength, unsigned char* buffer) +void JrdStatement::getInfo(Status* user_status, int level, unsigned int itemsLength, + const unsigned char* items, unsigned int bufferLength, unsigned char* buffer) { /************************************** * @@ -3286,12 +3286,13 @@ } successful_completion(user_status); + return result; } void JrdStatement::send(Status* user_status, int level, unsigned int msg_type, - unsigned int msg_length, const unsigned char* msg) + unsigned int msg_length, const unsigned char* msg) { /************************************** * @@ -3348,11 +3349,12 @@ * **************************************/ Svc* svc = NULL; + try { ThreadContextHolder tdbb(user_status); - svc = new Svc (new Service(service_name, spbLength, spb)); + svc = new Svc(new Service(service_name, spbLength, spb)); } catch (const Exception& ex) { @@ -3361,6 +3363,7 @@ } successful_completion(user_status); + return svc; } @@ -3440,6 +3443,7 @@ // If there is a status vector from a service thread, copy it into the thread status size_t len, warning; PARSE_STATUS(svc->getStatus(), len, warning); + if (len) { user_status->set(len, svc->getStatus()); @@ -3501,7 +3505,7 @@ void JrdStatement::startAndSend(Status* user_status, FbApi::Transaction* tra, int level, - unsigned int msg_type, unsigned int msg_length, const unsigned char* msg) + unsigned int msg_type, unsigned int msg_length, const unsigned char* msg) { /************************************** * @@ -3780,8 +3784,7 @@ */ FbApi::Transaction* Attachment::startTransaction(Status* user_status, - unsigned int tpbLength, const unsigned char* tpb, - FB_API_HANDLE public_handle) + unsigned int tpbLength, const unsigned char* tpb, FB_API_HANDLE public_handle) { /************************************** * @@ -3813,15 +3816,16 @@ } successful_completion(user_status); + return tra; } void jrd_tra::transactRequest(Status* user_status, - 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, - FbApi::Attachment* apiAtt) + 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, + FbApi::Attachment* apiAtt) { /************************************** * @@ -3959,8 +3963,8 @@ void jrd_tra::getInfo(Status* user_status, - unsigned int itemsLength, const unsigned char* items, - unsigned int bufferLength, unsigned char* buffer) + unsigned int itemsLength, const unsigned char* items, + unsigned int bufferLength, unsigned char* buffer) { /************************************** * @@ -4072,17 +4076,19 @@ } successful_completion(user_status); + return stmt; } FbApi::Transaction* dsql_req::executeMessage(Status* user_status, FbApi::Transaction* apiTra, - unsigned int in_blr_length, const unsigned char* in_blr, - unsigned int in_msg_type, unsigned int in_msg_length, const unsigned char* in_msg, - unsigned int out_blr_length, const unsigned char* out_blr, - unsigned int /*out_msg_type*/, unsigned int out_msg_length, unsigned char* out_msg) + unsigned int in_blr_length, const unsigned char* in_blr, + unsigned int in_msg_type, unsigned int in_msg_length, const unsigned char* in_msg, + unsigned int out_blr_length, const unsigned char* out_blr, + unsigned int /*out_msg_type*/, unsigned int out_msg_length, unsigned char* out_msg) { jrd_tra* tra = reinterpret_cast<jrd_tra*>(apiTra); + try { ThreadContextHolder tdbb(user_status); @@ -4117,18 +4123,20 @@ } successful_completion(user_status); + return tra; } FbApi::Transaction* Attachment::execute(Status* user_status, FbApi::Transaction* apiTra, - unsigned int length, const char* string, unsigned int dialect, - unsigned int in_blr_length, const unsigned char* in_blr, - unsigned int /*in_msg_type*/, unsigned int in_msg_length, const unsigned char* in_msg, - unsigned int out_blr_length, unsigned char* out_blr, - unsigned int /*out_msg_type*/, unsigned int out_msg_length, unsigned char* out_msg) + unsigned int length, const char* string, unsigned int dialect, + unsigned int in_blr_length, const unsigned char* in_blr, + unsigned int /*in_msg_type*/, unsigned int in_msg_length, const unsigned char* in_msg, + unsigned int out_blr_length, unsigned char* out_blr, + unsigned int /*out_msg_type*/, unsigned int out_msg_length, unsigned char* out_msg) { jrd_tra* tra = reinterpret_cast<jrd_tra*>(apiTra); + try { ThreadContextHolder tdbb(user_status); @@ -4163,13 +4171,14 @@ } successful_completion(user_status); + return tra; } int dsql_req::fetchMessage(Status* user_status, - unsigned int blr_length, const unsigned char* blr, - unsigned int /*msg_type*/, unsigned int msg_length, unsigned char* msg) + unsigned int blr_length, const unsigned char* blr, + unsigned int /*msg_type*/, unsigned int msg_length, unsigned char* msg) { int return_code = 0; @@ -4199,6 +4208,7 @@ } successful_completion(user_status, return_code); + return return_code; } @@ -4234,7 +4244,7 @@ void dsql_req::insertMessage(Status* user_status, unsigned int blr_length, const unsigned char* blr, - unsigned int /*msg_type*/, unsigned int msg_length, const unsigned char* msg) + unsigned int /*msg_type*/, unsigned int msg_length, const unsigned char* msg) { try { @@ -4246,8 +4256,7 @@ try { - DSQL_insert(tdbb, this, blr_length, blr, - /*msg_type,*/ msg_length, msg); + DSQL_insert(tdbb, this, blr_length, blr, /*msg_type,*/ msg_length, msg); } catch (const Exception& ex) { @@ -4338,8 +4347,8 @@ void dsql_req::getInfo(Status* user_status, - unsigned int item_length, const unsigned char* items, - unsigned int buffer_length, unsigned char* buffer) + unsigned int item_length, const unsigned char* items, + unsigned int buffer_length, unsigned char* buffer) { try { Modified: firebird/trunk/src/jrd/jrd_proto.h =================================================================== --- firebird/trunk/src/jrd/jrd_proto.h 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/jrd/jrd_proto.h 2010-10-12 17:40:27 UTC (rev 51662) @@ -43,7 +43,7 @@ void jrd_vtof(const char*, char*, SSHORT); -namespace FbApi +namespace FbApi { class Provider; } Modified: firebird/trunk/src/jrd/tra.h =================================================================== --- firebird/trunk/src/jrd/tra.h 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/jrd/tra.h 2010-10-12 17:40:27 UTC (rev 51662) @@ -335,12 +335,12 @@ unsigned int param_length, const unsigned char* param, int sliceLength, unsigned char* slice, FbApi::Attachment* att = 0); - virtual void transactRequest(Status* status, + virtual void transactRequest(Status* status, 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, FbApi::Attachment* att = 0); - virtual void prepare(Status* status, + virtual void prepare(Status* status, unsigned int msg_length = 0, const unsigned char* message = 0); virtual void ddl(Status* status, unsigned int length, const unsigned char* ddlCommand); virtual void commit(Status* status); Modified: firebird/trunk/src/jrd/trace/TraceManager.cpp =================================================================== --- firebird/trunk/src/jrd/trace/TraceManager.cpp 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/jrd/trace/TraceManager.cpp 2010-10-12 17:40:27 UTC (rev 51662) @@ -32,7 +32,7 @@ #include "../../jrd/trace/TraceManager.h" #include "../../jrd/trace/TraceObjects.h" #include "../../common/os/path_utils.h" -#include "../common/ScanDir.h" +#include "../../common/ScanDir.h" #ifdef WIN_NT #include <process.h> Modified: firebird/trunk/src/remote/client/interface.cpp =================================================================== --- firebird/trunk/src/remote/client/interface.cpp 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/remote/client/interface.cpp 2010-10-12 17:40:27 UTC (rev 51662) @@ -191,12 +191,12 @@ unsigned int param_length, const unsigned char* param, int sliceLength, unsigned char* slice, FbApi::Attachment* att = 0); - virtual void transactRequest(Status* status, + virtual void transactRequest(Status* status, 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, FbApi::Attachment* att = 0); - virtual void prepare(Status* status, + virtual void prepare(Status* status, unsigned int msg_length = 0, const unsigned char* message = 0); virtual void ddl(Status* status, unsigned int length, const unsigned char* ddlCommand); virtual void commit(Status* status); @@ -261,7 +261,7 @@ unsigned int msg_type, unsigned int msg_length, unsigned char* message); // returns 100 if EOF, 101 if fragmented // virtual void insert(Status* status, Sqlda* in); - virtual void insertMessage(Status* status, + virtual void insertMessage(Status* status, unsigned int blr_length, const unsigned char* blr, unsigned int msg_type, unsigned int msg_length, const unsigned char* message); @@ -359,12 +359,12 @@ unsigned int bufferLength, unsigned char* buffer); // virtual FbApi::Transaction* startTransaction(Status* status, unsigned int tpbLength, const unsigned char* tpb); // second form is tmp - not to rewrite external engines right now - virtual FbApi::Transaction* startTransaction(Status* status, unsigned int tpbLength, const unsigned char* tpb, + virtual FbApi::Transaction* startTransaction(Status* status, unsigned int tpbLength, const unsigned char* tpb, FB_API_HANDLE api); virtual FbApi::Transaction* reconnectTransaction(Status* status, unsigned int length, const unsigned char* id); virtual FbApi::Statement* allocateStatement(Status* status); virtual FbApi::Request* compileRequest(Status* status, unsigned int blr_length, const unsigned char* blr); - virtual FbApi::Transaction* execute(Status* status, FbApi::Transaction* transaction, + virtual FbApi::Transaction* execute(Status* status, FbApi::Transaction* transaction, unsigned int length, const char* string, unsigned int dialect, unsigned int in_blr_length, const unsigned char* in_blr, unsigned int in_msg_type, unsigned int in_msg_length, const unsigned char* in_msg, @@ -740,7 +740,7 @@ // Make sure protocol supports action - if (port->port_protocol < PROTOCOL_VERSION6) + if (port->port_protocol < PROTOCOL_VERSION6) { unsupported(); } @@ -2493,7 +2493,7 @@ // make sure the protocol supports it - if (rdb->rdb_port->port_protocol < PROTOCOL_VERSION7) + if (rdb->rdb_port->port_protocol < PROTOCOL_VERSION7) { unsupported(); } @@ -2903,8 +2903,7 @@ } -void Transaction::prepare(Status* status, - unsigned int msg_length, const unsigned char* msg) +void Transaction::prepare(Status* status, unsigned int msg_length, const unsigned char* msg) { /************************************** * @@ -2932,7 +2931,7 @@ if (rdb->rdb_port->port_protocol < PROTOCOL_VERSION4) { - if (msg_length) + if (msg_length) { unsupported(); } @@ -3387,8 +3386,7 @@ FbApi::Transaction* Attachment::reconnectTransaction(Status* status, - unsigned int length, - const unsigned char* id) + unsigned int length, const unsigned char* id) { /************************************** * @@ -3946,7 +3944,7 @@ // make sure the protocol supports it - if (rdb->rdb_port->port_protocol < PROTOCOL_VERSION8) + if (rdb->rdb_port->port_protocol < PROTOCOL_VERSION8) { unsupported(); } @@ -4899,7 +4897,7 @@ // always clear the complete queue for XNET, as we might // have incomplete packets - if (id != request->rrq_id || port->port_type == rem_port::XNET) + if (id != request->rrq_id || port->port_type == rem_port::XNET) { clear_queue = true; } @@ -4925,7 +4923,7 @@ // Walk the que until we find the predecessor of message - while (message->msg_next != new_msg->msg_next) + while (message->msg_next != new_msg->msg_next) { message = message->msg_next; } @@ -5458,7 +5456,7 @@ -static void init(Status* status, +static void init(Status* status, rem_port* port, P_OP op, PathName& file_name, Modified: firebird/trunk/src/remote/inet.cpp =================================================================== --- firebird/trunk/src/remote/inet.cpp 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/remote/inet.cpp 2010-10-12 17:40:27 UTC (rev 51662) @@ -504,7 +504,7 @@ rem_port* INET_connect(const TEXT* name, PACKET* packet, - USHORT flag, + USHORT flag, Firebird::ClumpletReader* dpb) { /************************************** Modified: firebird/trunk/src/remote/protocol.h =================================================================== --- firebird/trunk/src/remote/protocol.h 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/remote/protocol.h 2010-10-12 17:40:27 UTC (rev 51662) @@ -397,7 +397,7 @@ ULONG bid_quad_high; ULONG bid_quad_low; - bid& operator=(const ISC_QUAD& v) + bid& operator =(const ISC_QUAD& v) { bid_quad_high = v.gds_quad_high; bid_quad_low = v.gds_quad_low; Modified: firebird/trunk/src/remote/remote.cpp =================================================================== --- firebird/trunk/src/remote/remote.cpp 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/remote/remote.cpp 2010-10-12 17:40:27 UTC (rev 51662) @@ -799,6 +799,7 @@ --portCounter; #endif } + /* void Rdb::set_async_vector(ISC_STATUS* userStatus) throw() { @@ -817,6 +818,7 @@ return rdb_async_thread_id == getThreadId() ? rdb_async_status_vector : rdb_status_vector; } */ + Rrq::~Rrq() { } Modified: firebird/trunk/src/remote/server/os/posix/inet_server.cpp =================================================================== --- firebird/trunk/src/remote/server/os/posix/inet_server.cpp 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/remote/server/os/posix/inet_server.cpp 2010-10-12 17:40:27 UTC (rev 51662) @@ -424,7 +424,7 @@ } // extern "C" -static void set_signal( int signal_number, void (*handler) (int)) +static void set_signal(int signal_number, void (*handler) (int)) { /************************************** * Modified: firebird/trunk/src/yvalve/prepa_proto.h =================================================================== --- firebird/trunk/src/yvalve/prepa_proto.h 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/yvalve/prepa_proto.h 2010-10-12 17:40:27 UTC (rev 51662) @@ -28,4 +28,3 @@ bool*, USHORT); #endif // DSQL_PREPA_PROTO_H - Modified: firebird/trunk/src/yvalve/why.cpp =================================================================== --- firebird/trunk/src/yvalve/why.cpp 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/yvalve/why.cpp 2010-10-12 17:40:27 UTC (rev 51662) @@ -1107,7 +1107,7 @@ class ProviderPtr // this class may be treated as plain data { public: - ProviderPtr(FbApi::Provider* v, ModuleLoader::Module* m) + ProviderPtr(FbApi::Provider* v, ModuleLoader::Module* m) : p(v), mod(m) { } FbApi::Provider* get() const @@ -1682,8 +1682,7 @@ } -ISC_STATUS API_ROUTINE isc_commit_transaction(ISC_STATUS * user_status, - FB_API_HANDLE * tra_handle) +ISC_STATUS API_ROUTINE isc_commit_transaction(ISC_STATUS* user_status, FB_API_HANDLE* tra_handle) { /************************************** * @@ -1750,8 +1749,7 @@ } -ISC_STATUS API_ROUTINE isc_commit_retaining(ISC_STATUS * user_status, - FB_API_HANDLE * tra_handle) +ISC_STATUS API_ROUTINE isc_commit_retaining(ISC_STATUS* user_status, FB_API_HANDLE* tra_handle) { /************************************** * @@ -1822,7 +1820,7 @@ YEntry entryGuard(attachment); nullCheck(req_handle, isc_bad_req_handle); - rq = attachment->handle->compileRequest(&status, blr_length, + rq = attachment->handle->compileRequest(&status, blr_length, reinterpret_cast<const unsigned char*>(blr)); if (!status.isSuccess()) { @@ -4243,7 +4241,7 @@ if (sub->handle) { sub->handle->rollback(&status); - if ((!status.isSuccess()) && + if ((!status.isSuccess()) && ( !is_network_error(status) || (transaction->flags & HANDLE_TRANSACTION_limbo) ) ) { @@ -4332,7 +4330,7 @@ Request request = translate<CRequest>(req_handle); YEntry entryGuard(request); - request->handle->send(&status, level, msg_type, msg_length, + request->handle->send(&status, level, msg_type, msg_length, reinterpret_cast<const unsigned char*>(msg)); } catch (const Exception& e) @@ -4508,7 +4506,7 @@ Service service = translate<CService>(handle); service->handle->query(&status, send_item_length, reinterpret_cast<const unsigned char*>(send_items), - recv_item_length, reinterpret_cast<const unsigned char*>(recv_items), + recv_item_length, reinterpret_cast<const unsigned char*>(recv_items), buffer_length, reinterpret_cast<unsigned char*>(buffer)); } catch (const Exception& e) @@ -4687,7 +4685,7 @@ Transaction sub(new CTransaction(tra_handle, ~0)); sub->next = transaction; } - else + else { *tra_handle = transaction->public_handle; } @@ -4792,7 +4790,7 @@ transaction->handle->transactRequest(&status, blr_length, reinterpret_cast<unsigned char*>(blr), in_msg_length, reinterpret_cast<unsigned char*>(in_msg), - out_msg_length, reinterpret_cast<unsigned char*>(out_msg), + out_msg_length, reinterpret_cast<unsigned char*>(out_msg), attachment->handle); } catch (const Exception& e) @@ -4860,7 +4858,7 @@ Transaction transaction = translate<CTransaction>(tra_handle); YEntry entryGuard(transaction); - if (transaction->handle) + if (transaction->handle) { transaction->handle->getInfo(&status, item_length, items, buffer_length, buffer); } @@ -5330,7 +5328,7 @@ transaction->handle->createBlob(&status, blob_id, bpb_length, bpb, attachment->handle) : transaction->handle->openBlob(&status, blob_id, bpb_length, bpb, attachment->handle); - if (!status.isSuccess()) + if (!status.isSuccess()) { return status[1]; } Modified: firebird/trunk/src/yvalve/why_proto.h =================================================================== --- firebird/trunk/src/yvalve/why_proto.h 2010-10-12 13:00:47 UTC (rev 51661) +++ firebird/trunk/src/yvalve/why_proto.h 2010-10-12 17:40:27 UTC (rev 51662) @@ -41,9 +41,9 @@ const SCHAR*, USHORT, USHORT, SCHAR*); ISC_STATUS API_ROUTINE isc_dsql_execute2(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, USHORT, const XSQLDA*, const XSQLDA*); -ISC_STATUS API_ROUTINE isc_dsql_execute2_m(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, +ISC_STATUS API_ROUTINE isc_dsql_execute2_m(ISC_STATUS*, FB_API_HANDLE*, FB_API_HANDLE*, USHORT, const SCHAR*, - USHORT, USHORT, const SCHAR*, + USHORT, USHORT, const SCHAR*, USHORT, SCHAR*, USHORT, USHORT, SCHAR*); ISC_STATUS API_ROUTINE isc_dsql_execute_immediate(ISC_STATUS*, FB_API_HANDLE*, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |