From: Vlad K. <hv...@us...> - 2008-03-15 13:46:32
|
Build Version : T2.5.0.18822 Firebird 2.5 Unstable (writeBuildNum.sh,v 1.18982 2008/03/15 13:46:32 hvlad Exp $ ) Update of /cvsroot/firebird/firebird2/src/remote In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv31309/remote Modified Files: inet.cpp server.cpp Log Message: Fixed few my mistakes noted by Claudio Index: inet.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/remote/inet.cpp,v retrieving revision 1.211 retrieving revision 1.212 diff -b -U3 -r1.211 -r1.212 --- inet.cpp 15 Mar 2008 10:27:49 -0000 1.211 +++ inet.cpp 15 Mar 2008 13:46:28 -0000 1.212 @@ -3482,16 +3482,16 @@ for (rem_port* port = main_port; port; port = port->port_next) { Firebird::RefMutexEnsureUnlock portGuard(*port->port_sync); - if (port->port_sync->tryEnter()) { + if (portGuard.tryEnter()) { if (port->port_state == state_disconnected) { more = true; unhook_port(port, port->port_parent); - port->port_sync->leave(); + portGuard.leave(); cleanup_port(port); break; } else { - port->port_sync->leave(); + portGuard.leave(); } } } Index: server.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/remote/server.cpp,v retrieving revision 1.181 retrieving revision 1.182 diff -b -U3 -r1.181 -r1.182 --- server.cpp 15 Mar 2008 10:28:25 -0000 1.181 +++ server.cpp 15 Mar 2008 13:46:28 -0000 1.182 @@ -537,7 +537,7 @@ } Firebird::RefMutexEnsureUnlock portGuard(*port->port_sync); - const bool portLocked = port->port_sync->tryEnter(); + const bool portLocked = portGuard.tryEnter(); if (portLocked || !dataSize) { @@ -558,7 +558,7 @@ if (request->req_receive.p_operation == op_partial) { port->setRecvState(recvState); - port->port_sync->leave(); + portGuard.leave(); // gds__log("Partial"); free_request(request); @@ -577,7 +577,7 @@ request->req_port = port; if (portLocked) { - port->port_sync->leave(); + portGuard.leave(); } if (!link_request(port, request)) @@ -5286,7 +5286,7 @@ /* Validate port. If it looks ok, process request */ - Firebird::RefMutexEnsureUnlock portQueGuard(*request->req_port->port_sync); + Firebird::RefMutexEnsureUnlock portQueGuard(*request->req_port->port_que_sync); { // port_sync scope Firebird::RefMutexGuard portGuard(*request->req_port->port_sync); @@ -5331,7 +5331,7 @@ // port_sync, else we can miss data arrived at time between // releasing locks and will never handle it. Therefore we // can't ise MutexLockGuard here - port->port_que_sync->enter(); + portQueGuard.enter(); if (port->haveRecvData()) { SERVER_REQ new_request = alloc_request(); @@ -5360,7 +5360,7 @@ } // port_sync scope if (port) { - port->port_que_sync->leave(); + portQueGuard.leave(); } { // request_que_mutex scope |