summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2004-11-24 20:04:03 +0000
committerSteve Huston <shuston@riverace.com>2004-11-24 20:04:03 +0000
commit2b21f1a4ba64e767aec2048570adfc0e2b8599b2 (patch)
tree5def8daa92c958705b43a71c204de64e92e0c01c /tests
parent0fdafbed5a5aa9963e38472dbe033b407aef5dd2 (diff)
downloadATCD-2b21f1a4ba64e767aec2048570adfc0e2b8599b2.tar.gz
ChangeLogTag:Wed Nov 24 14:40:29 2004 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/NonBlocking_Conn_Test.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/NonBlocking_Conn_Test.cpp b/tests/NonBlocking_Conn_Test.cpp
index 4d240a150a7..42ed8adc1e1 100644
--- a/tests/NonBlocking_Conn_Test.cpp
+++ b/tests/NonBlocking_Conn_Test.cpp
@@ -157,14 +157,18 @@ test_connect (ACE_Reactor &reactor,
void
test (ACE_Reactor_Impl *impl)
{
- number_of_connections = sizeof hosts / sizeof (char *);
-
+ size_t nr_names = sizeof hosts / sizeof (char *);
ACE_INET_Addr *addresses =
- new ACE_INET_Addr[number_of_connections];
+ new ACE_INET_Addr[nr_names];
- for (int i = 0; i < number_of_connections; ++i)
+ for (size_t i = 0, number_of_connections = 0; i < nr_names; ++i)
{
- addresses[i] = ACE_INET_Addr (hosts[i]);
+ if (addresses[number_of_connections].set (hosts[i]) == 0)
+ ++number_of_connections;
+ else
+ ACE_DEBUG ((LM_INFO,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT_CHAR_TO_TCHAR (hosts[i])));
}
ACE_Reactor reactor (impl,