summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Mesnier <mesnier_p@ociweb.com>2013-05-13 15:02:02 +0000
committerPhil Mesnier <mesnier_p@ociweb.com>2013-05-13 15:02:02 +0000
commita5c873c8bde0d603bca6135f85ea753321248470 (patch)
tree27dda7a8c2ad6dd4de84d0e6f035b052aafb7bc9
parent2bddc612d90cb0d0c7a83ade794bd764f2a2cc16 (diff)
downloadATCD-a5c873c8bde0d603bca6135f85ea753321248470.tar.gz
Mon May 13 15:00:19 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
-rw-r--r--TAO/ChangeLog_Asynch_ImR12
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp33
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/AsyncListManager.h1
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/servers_list/Test.idl2
4 files changed, 33 insertions, 15 deletions
diff --git a/TAO/ChangeLog_Asynch_ImR b/TAO/ChangeLog_Asynch_ImR
index 0b4baeddc79..36d139a6853 100644
--- a/TAO/ChangeLog_Asynch_ImR
+++ b/TAO/ChangeLog_Asynch_ImR
@@ -1,3 +1,15 @@
+Mon May 13 15:00:19 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
+
+ * orbsvcs/ImplRepo_Service/AsyncListManager.h:
+ * orbsvcs/ImplRepo_Service/AsyncListManager.cpp:
+
+ Clean up runtime failures.
+
+ * orbsvcs/tests/ImplRepo/servers_list/Test.idl:
+
+ Make the abort() operation a oneway so that commfails are avoided
+ in the client.
+
Sun May 12 16:45:48 UTC 2013 Phil Mesnier <mesnier_p@ociweb.com>
* orbsvcs/ImplRepo_Service/AsyncAccessManager.h:
diff --git a/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp b/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp
index 8532e5a1b9d..7a16a42750f 100644
--- a/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.cpp
@@ -20,10 +20,10 @@ AsyncListManager::AsyncListManager (const Locator_Repository *repo,
pinger_ (pinger),
server_list_ (0),
first_ (0),
+ waiters_ (0),
refcount_ (1),
lock_ ()
{
-
}
AsyncListManager::~AsyncListManager (void)
@@ -39,20 +39,13 @@ AsyncListManager::poa (void)
void
AsyncListManager::final_state (void)
{
- CORBA::ULong len = this->server_list_.length ();
- if (this->pinger_ != 0)
+ if (this->pinger_ != 0 && this->waiters_ > 0)
{
- for (CORBA::ULong i = 0; i < len; i++)
- {
- if (this->server_list_[i].activeStatus ==
- ImplementationRepository::ACTIVE_MAYBE)
- {
- return;
- }
- }
+ return;
}
bool excepted = false;
+ CORBA::ULong len = this->server_list_.length ();
if (!CORBA::is_nil (this->primary_.in()))
{
@@ -184,20 +177,31 @@ AsyncListManager::list_i (CORBA::ULong start, CORBA::ULong how_many)
}
}
}
+ if (len == 0 || this->pinger_ == 0)
+ {
+ this->final_state ();
+ }
+ else
+ {
+ this->waiters_ = len;
+ }
}
void
-AsyncListManager::ping_replied (CORBA::ULong index, LiveStatus server)
+AsyncListManager::ping_replied (CORBA::ULong index, LiveStatus status)
{
- switch (server)
+ switch (status)
{
case LS_ALIVE:
case LS_LAST_TRANSIENT:
- case LS_TIMEDOUT:
this->server_list_[index].activeStatus =
ImplementationRepository::ACTIVE_YES;
break;
+ case LS_TIMEDOUT:
+ this->server_list_[index].activeStatus =
+ ImplementationRepository::ACTIVE_MAYBE;
+ break;
case LS_DEAD:
this->server_list_[index].activeStatus =
ImplementationRepository::ACTIVE_NO;
@@ -205,6 +209,7 @@ AsyncListManager::ping_replied (CORBA::ULong index, LiveStatus server)
default:
return;
}
+ this->waiters_--;
this->final_state();
}
diff --git a/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.h b/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.h
index c0916391307..9aa5799b86e 100644
--- a/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.h
+++ b/TAO/orbsvcs/ImplRepo_Service/AsyncListManager.h
@@ -69,6 +69,7 @@ class AsyncListManager
LiveCheck *pinger_;
ImplementationRepository::ServerInformationList server_list_;
CORBA::ULong first_;
+ CORBA::ULong waiters_;
int refcount_;
TAO_SYNCH_MUTEX lock_;
};
diff --git a/TAO/orbsvcs/tests/ImplRepo/servers_list/Test.idl b/TAO/orbsvcs/tests/ImplRepo/servers_list/Test.idl
index 6624e95ac91..294bfad5aa7 100644
--- a/TAO/orbsvcs/tests/ImplRepo/servers_list/Test.idl
+++ b/TAO/orbsvcs/tests/ImplRepo/servers_list/Test.idl
@@ -8,7 +8,7 @@ interface Test
// After replying, abort process
// delay_secs seconds.
- void abort ( in short delay_secs );
+ oneway void abort ( in short delay_secs );
};