summaryrefslogtreecommitdiff
path: root/ACE/tests/INET_Addr_Test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/tests/INET_Addr_Test.cpp')
-rw-r--r--ACE/tests/INET_Addr_Test.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/ACE/tests/INET_Addr_Test.cpp b/ACE/tests/INET_Addr_Test.cpp
index 816c2eb2b7d..6b389470032 100644
--- a/ACE/tests/INET_Addr_Test.cpp
+++ b/ACE/tests/INET_Addr_Test.cpp
@@ -390,14 +390,17 @@ int run_main (int, ACE_TCHAR *[])
{
ACE_INET_Addr addr;
int old_type = addr.get_type();
- addr.set(12345, ACE_TEXT ("localhost"));
- if (addr.get_type() != old_type) {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("IPv6 set failed: before addr.set(12345), addr.type() = %d\n")
- ACE_TEXT (" after addr.set(12345), addr.type() = %d\n"),
- old_type,
- addr.get_type ()));
- status = 1;
+ if (addr.set(12345, ACE_TEXT ("localhost")) == 0) {
+ if (addr.get_type() != old_type) {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("IPv6 set failed: addr.set(12345, \"localhost\"), old addr.type() = %d, new addr_type()= %d\n"),
+ old_type,
+ addr.get_type ()));
+ status = 1;
+ }
+ }
+ else {
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("IPv6 set failed: addr.set(12345, \"localhost\") returns nonzero\n")));
}
}