summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-06-15 02:53:45 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-06-15 02:53:45 +0000
commit746cd010fa993b232930e9f69eb2460f8ca08346 (patch)
tree1ffb4d729feeaeef13a890ca8a71d1b1f3baaddd
parent6c089a6fa838654f49e75a5fd95a57cd06a02da5 (diff)
downloadATCD-746cd010fa993b232930e9f69eb2460f8ca08346.tar.gz
.
-rw-r--r--ChangeLog-99b7
-rw-r--r--README1
-rw-r--r--ace/Connector.h21
3 files changed, 21 insertions, 8 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b
index 5a6f169904c..adc8d859984 100644
--- a/ChangeLog-99b
+++ b/ChangeLog-99b
@@ -1,3 +1,10 @@
+Mon Jun 14 21:41:40 1999 Douglas C. Schmidt <schmidt@mambo.cs.wustl.edu>
+
+ * ace/Connector.h: Added a comment to clarify that if
+ Connector::connect() fails the close() hook of the Svc_Handler
+ is called to prevent resource leaks. Thanks to V. Lakshmanan
+ <lakshman@doplight.nssl.noaa.gov> for motivating this.
+
Mon Jun 14 20:54:09 1999 Kirthika Parameswaran <kirthika@cs.wustl.edu>
* ace/Synch.cpp: Declared template definitions for
diff --git a/README b/README
index 6c5d6abf0ef..fbec632c834 100644
--- a/README
+++ b/README
@@ -865,6 +865,7 @@ Bruce Trask <BTRASK@contactsystems.com>
Jake Hamby <jehamby@anobject.com>
Rick Weisner <Rick.Weisner@East.Sun.COM>
Dennis C. De Mars <demars@mminternet.com>
+V. Lakshmanan <lakshman@doplight.nssl.noaa.gov>
I would particularly like to thank Paul Stephenson, who worked with me
at Ericsson and is now at ObjectSpace. Paul devised the recursive
diff --git a/ace/Connector.h b/ace/Connector.h
index 4f1f93a00b8..d01dc24d1e2 100644
--- a/ace/Connector.h
+++ b/ace/Connector.h
@@ -148,7 +148,9 @@ public:
// <local_addr> be reused by passing a value <reuse_addr> ==
// 1). <flags> and <perms> can be used to pass any flags that are
// needed to perform specific operations such as opening a file
- // within connect with certain permissions.
+ // within connect with certain permissions. If the connection fails
+ // the <close> hook on the <svc_handler> will be called
+ // automatically to prevent resource leaks.
virtual int connect (SVC_HANDLER *&svc_handler_hint,
SVC_HANDLER *&svc_handler,
@@ -159,18 +161,21 @@ public:
int reuse_addr = 0,
int flags = O_RDWR,
int perms = 0);
- // A variation on the previous connect(), on cached connectors the
- // <svc_handler_hint> variable can be used as a hint for future
- // lookups. Since this variable is modified in the context of the
- // internal cache its use is thread-safe. But the actual
- // svc_handler for the current connection is returned in the second
- // parameter <svc_handler>.
+ // This is a variation on the previous <connect> method. On cached
+ // connectors the <svc_handler_hint> variable can be used as a hint
+ // for future lookups. Since this variable is modified in the
+ // context of the internal cache its use is thread-safe. But the
+ // actual svc_handler for the current connection is returned in the
+ // second parameter <svc_handler>. If the connection fails the
+ // <close> hook on the <svc_handler> will be called automatically to
+ // prevent resource leaks.
virtual int connect_n (size_t n,
SVC_HANDLER *svc_handlers[],
ACE_PEER_CONNECTOR_ADDR remote_addrs[],
ASYS_TCHAR *failed_svc_handlers = 0,
- const ACE_Synch_Options &synch_options = ACE_Synch_Options::defaults);
+ const ACE_Synch_Options &synch_options =
+ ACE_Synch_Options::defaults);
// Initiate connection of <n> <svc_handlers> to peers at
// <remote_addrs> using <synch_options>. Returns -1 if failure
// occurs and 0 otherwise. If <failed_svc_handlers> is non-NULL, a