|
|
Choosing A Webhost: |
CVS update of carob/src (ControllerConnectPolicy.cpp): msg#00066db.carob.cvs
Date: Tuesday, February 21, 2006 @ 17:08:06 Author: gilles Path: /cvsroot/carob/carob/src Modified: ControllerConnectPolicy.cpp (1.9 -> 1.10) simplified/clarified/debug? RRpolicy getController() loop -----------------------------+ ControllerConnectPolicy.cpp | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) Index: carob/src/ControllerConnectPolicy.cpp diff -u carob/src/ControllerConnectPolicy.cpp:1.9 carob/src/ControllerConnectPolicy.cpp:1.10 --- carob/src/ControllerConnectPolicy.cpp:1.9 Wed Feb 15 11:03:42 2006 +++ carob/src/ControllerConnectPolicy.cpp Tue Feb 21 17:08:06 2006 @@ -252,16 +252,18 @@ LockScope ls(&policy_CS); { LockScope scLs(&suspected_controllers_CS); - unsigned int testedControllers = 0; + unsigned int testedControllers = 0; //unsigned because we compare it to vector.size() + bool lastTestedControllerWasSuspect = false; do { index = (index + 1) % controller_list.size(); + lastTestedControllerWasSuspect = isSuspectedOfFailure(controller_list[index]); testedControllers++; } - while (isSuspectedOfFailure(controller_list[index]) + while (lastTestedControllerWasSuspect && testedControllers <= controller_list.size()); - // if there are on more controllers up => exception - if (testedControllers > controller_list.size()) + // if there are no more controllers up => exception + if (lastTestedControllerWasSuspect) { throw NoMoreControllerException(L"All " + toWString(suspected_controllers.size())
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS update of libmysequoia/src (CarobMySQL.cpp), zsolt-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
|---|---|
| Next by Date: | CVS update of carob/src (JavaSocket.cpp), gilles-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Previous by Thread: | CVS update of carob/src (ControllerConnectPolicy.cpp), gilles-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Next by Thread: | CVS update of carob/test (3 files), gilles-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home
| advertise | OSDir is
an inevitable website.
|