summaryrefslogtreecommitdiff
path: root/ace/Connector.cpp
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>1997-11-07 00:30:35 +0000
committerSteve Huston <shuston@riverace.com>1997-11-07 00:30:35 +0000
commita8ade49f2b02a9f8e7c44b3d883bcfccb8f89527 (patch)
tree69080c23ec63b329db364e06bb7829968e89c9a9 /ace/Connector.cpp
parent17ce18355d7634db159575e5d0f7a3e7ccfb1d8d (diff)
downloadATCD-a8ade49f2b02a9f8e7c44b3d883bcfccb8f89527.tar.gz
Return -1 from connect_n if any connections fail.
Diffstat (limited to 'ace/Connector.cpp')
-rw-r--r--ace/Connector.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ace/Connector.cpp b/ace/Connector.cpp
index 206c12b06a1..18da7ff955e 100644
--- a/ace/Connector.cpp
+++ b/ace/Connector.cpp
@@ -401,6 +401,7 @@ ACE_Connector<SH, PR_CO_2>::connect_n (size_t n,
char failed_svc_handlers[],
const ACE_Synch_Options &synch_options)
{
+ int status = 0; // Set to -1 if an error occurs
size_t i;
for (i = 0; i < n; i++)
@@ -409,6 +410,7 @@ ACE_Connector<SH, PR_CO_2>::connect_n (size_t n,
&& !(synch_options[ACE_Synch_Options::USE_REACTOR]
&& errno == EWOULDBLOCK))
{
+ status = -1;
if (failed_svc_handlers != 0)
// Mark this entry as having failed.
failed_svc_handlers[i] = 1;
@@ -418,7 +420,7 @@ ACE_Connector<SH, PR_CO_2>::connect_n (size_t n,
failed_svc_handlers[i] = 0;
}
- return 0;
+ return status;
}
// Cancel a <svc_handler> that was started asynchronously.