From cd010ff939bad80f0ec60efc600995cf352aabcf Mon Sep 17 00:00:00 2001 From: asfernandes Date: Sat, 17 Jan 2009 19:07:07 +0000 Subject: [PATCH] Misc --- doc/README.user.troubleshooting | 2 +- src/jrd/svc.cpp | 10 +++++----- src/remote/interface.cpp | 14 +++++++------- src/remote/os/win32/property.cpp | 2 +- src/remote/parser.cpp | 2 +- src/remote/server.cpp | 6 +++--- src/remote/server_stub.cpp | 4 ++-- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/README.user.troubleshooting b/doc/README.user.troubleshooting index 11a3d4046c..e7d69ac1bc 100644 --- a/doc/README.user.troubleshooting +++ b/doc/README.user.troubleshooting @@ -81,7 +81,7 @@ your circumstance. For inetd the /etc/inetd.conf file should have a line as follows - gds_db stream tcp nowait.30000 root /opt/firebird/bin/gds_inet_server gds_inet_server + gds_db stream tcp nowait.30000 root /opt/firebird/bin/fb_inet_server gds_inet_server You will need to restart the inetd process before the server will work. $ps -ef | grep inetd diff --git a/src/jrd/svc.cpp b/src/jrd/svc.cpp index 9a02add8ee..be5928eb59 100644 --- a/src/jrd/svc.cpp +++ b/src/jrd/svc.cpp @@ -1916,7 +1916,7 @@ void Service::readFbLog() } } - if (!file || file && ferror(file)) + if (!file || (file && ferror(file))) { (Arg::Gds(isc_sys_request) << Arg::Str(file ? "fgets" : "fopen") << SYS_ERR(errno)).copyTo(svc_status); @@ -1981,7 +1981,7 @@ bool Service::full() const void Service::enqueue(const UCHAR* s, ULONG len) { - if (checkForShutdown() || svc_flags & SVC_detached) + if (checkForShutdown() || (svc_flags & SVC_detached)) { return; } @@ -1992,7 +1992,7 @@ void Service::enqueue(const UCHAR* s, ULONG len) while (full()) { THREAD_SLEEP(1); - if (checkForShutdown() || svc_flags & SVC_detached) + if (checkForShutdown() || (svc_flags & SVC_detached)) { return; } @@ -2037,7 +2037,7 @@ void Service::get(SCHAR* buffer, USHORT length, USHORT flags, USHORT timeout, US while (length) { - if ((empty() && svc_flags & SVC_finished) || checkForShutdown()) + if ((empty() && (svc_flags & SVC_finished)) || checkForShutdown()) { break; } @@ -2072,7 +2072,7 @@ void Service::get(SCHAR* buffer, USHORT length, USHORT flags, USHORT timeout, US * characters with a space. This will ensure that the output is * consistent when returning a line or to eof */ - if ((flags & GET_LINE) && (ch == '\n')) + if ((flags & GET_LINE) && ch == '\n') { buffer[(*return_length)++] = ' '; length = 0; diff --git a/src/remote/interface.cpp b/src/remote/interface.cpp index e018d435e1..13b026e1c4 100644 --- a/src/remote/interface.cpp +++ b/src/remote/interface.cpp @@ -1317,7 +1317,7 @@ ISC_STATUS GDS_DSQL_EXECUTE2(ISC_STATUS* user_status, } } - RMessage* message = 0; + RMessage* message = NULL; if (!statement->rsr_buffer) { statement->rsr_buffer = message = new RMessage(0); @@ -2055,7 +2055,7 @@ ISC_STATUS GDS_DSQL_INSERT(ISC_STATUS* user_status, } } - RMessage* message = 0; + RMessage* message = NULL; if (!statement->rsr_buffer) { statement->rsr_buffer = message = new RMessage(0); @@ -3307,11 +3307,12 @@ ISC_STATUS GDS_RECEIVE(ISC_STATUS * user_status, could dynamically adjust batching sizes based on fetch patterns */ if (port->port_flags & PORT_rpc) - + { /* This is an RPC (remote procedure call) port - we just do one at a time processing as that's how RPC works. */ data->p_data_messages = 1; + } else { data->p_data_messages = @@ -4226,7 +4227,7 @@ ISC_STATUS GDS_START_TRANSACTION(ISC_STATUS* user_status, try { - if ((tpb_length < 0) || (tpb_length > 0 && !tpb)) + if (tpb_length < 0 || (tpb_length > 0 && !tpb)) { status_exception::raise(Arg::Gds(isc_bad_tpb_form)); } @@ -4416,8 +4417,7 @@ ISC_STATUS GDS_TRANSACTION_INFO(ISC_STATUS* user_status, try { status = info(user_status, rdb, op_info_transaction, transaction->rtr_id, 0, - item_length, items, 0, 0, - buffer_length, buffer); + item_length, items, 0, 0, buffer_length, buffer); } catch (const Exception& ex) { @@ -6190,7 +6190,7 @@ static void dequeue_receive( rem_port* port) } -static bool receive_response(Rdb* rdb, PACKET * packet) +static bool receive_response(Rdb* rdb, PACKET* packet) { /************************************** * diff --git a/src/remote/os/win32/property.cpp b/src/remote/os/win32/property.cpp index 42d88d65c5..32ab2dc77d 100644 --- a/src/remote/os/win32/property.cpp +++ b/src/remote/os/win32/property.cpp @@ -262,7 +262,7 @@ LRESULT CALLBACK GeneralPage(HWND hDlg, UINT unMsg, WPARAM wParam, LPARAM lParam return FALSE; } -static char *MakeVersionString(char *pchBuf, int nLen, USHORT usServerFlagMask) +static char* MakeVersionString(char* pchBuf, int nLen, USHORT usServerFlagMask) { /****************************************************************************** * diff --git a/src/remote/parser.cpp b/src/remote/parser.cpp index bfaac9208b..996b541124 100644 --- a/src/remote/parser.cpp +++ b/src/remote/parser.cpp @@ -266,7 +266,7 @@ const UCHAR* PARSE_prepare_messages(const UCHAR* blr, USHORT blr_length) const UCHAR* new_blr = blr; const SSHORT version = *blr++; - if (((version != blr_version4) && (version != blr_version5)) || *blr++ != blr_begin) + if ((version != blr_version4 && version != blr_version5) || *blr++ != blr_begin) { return old_blr; } diff --git a/src/remote/server.cpp b/src/remote/server.cpp index 546c04bf0c..fa0d47b560 100644 --- a/src/remote/server.cpp +++ b/src/remote/server.cpp @@ -220,9 +220,9 @@ bool Worker::shutting_down = false; static Firebird::GlobalPtr request_que_mutex; -static server_req_t* request_que = NULL; -static server_req_t* free_requests = NULL; -static server_req_t* active_requests = NULL; +static server_req_t* request_que = NULL; +static server_req_t* free_requests = NULL; +static server_req_t* active_requests = NULL; static Firebird::GlobalPtr servers_mutex; static SRVR servers; diff --git a/src/remote/server_stub.cpp b/src/remote/server_stub.cpp index a2977f2262..f28b43afde 100644 --- a/src/remote/server_stub.cpp +++ b/src/remote/server_stub.cpp @@ -4,11 +4,11 @@ #ifndef MINGW extern "C" { -int CLIB_ROUTINE server_main( int argc, char** argv); +int CLIB_ROUTINE server_main(int argc, char** argv); } // This routine invokes server loop implemented in the shared library -int CLIB_ROUTINE main( int argc, char** argv) +int CLIB_ROUTINE main(int argc, char** argv) { return server_main(argc, argv); }