summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog-97a10
-rw-r--r--ace/Connector.cpp10
-rw-r--r--ace/Event_Handler.h7
-rw-r--r--ace/Svc_Handler.cpp2
-rw-r--r--ace/Svc_Handler.h10
5 files changed, 25 insertions, 14 deletions
diff --git a/ChangeLog-97a b/ChangeLog-97a
index 9dbd31be406..1a6d9839706 100644
--- a/ChangeLog-97a
+++ b/ChangeLog-97a
@@ -1,3 +1,13 @@
+Fri Jun 27 01:08:54 1997 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * ace/Connector.cpp (create_AST): Replaced the gratuitous #ifdef
+ for ACE_WIN32 and EXCEPT_MASK with the new CONNECT_MASK. This
+ is much cleaner!
+
+ * ace/Event_Handler.h: Added a new CONNECT_MASK that defaults to
+ READ_MASK | WRITE_MASK (with | EXCEPT_MASK thrown in for Win32).
+ Thanks to Irfan for this suggestion.
+
Thu Jun 26 19:53:11 1997 Nanbor Wang <nw1@lambada.cs.wustl.edu>
* ace/OS.i (strtok_r): Added check on a null string so we won't go
diff --git a/ace/Connector.cpp b/ace/Connector.cpp
index 75ed6336145..38ff95adca6 100644
--- a/ace/Connector.cpp
+++ b/ace/Connector.cpp
@@ -421,14 +421,8 @@ ACE_Connector<SH, PR_CO_2>::create_AST (SH *sh,
ACE_NEW_RETURN (ast, AST (sh, this->get_handle (), synch_options.arg (), -1), -1);
- // Register this with the reactor for both reading and writing
- // events.
- ACE_Reactor_Mask mask = ACE_Event_Handler::READ_MASK | ACE_Event_Handler::WRITE_MASK;
-
-#if defined (ACE_WIN32)
- // Win32 has some screwy semantics here...
- mask |= ACE_Event_Handler::EXCEPT_MASK;
-#endif /* ACE_WIN32 */
+ // Register this with the reactor for connection events.
+ ACE_Reactor_Mask mask = ACE_Event_Handler::CONNECT_MASK;
// Bind ACE_Svc_Tuple with the ACE_HANDLE we're trying to connect.
if (this->handler_map_.bind (this->get_handle (), ast) == -1)
diff --git a/ace/Event_Handler.h b/ace/Event_Handler.h
index e78462060d1..ed7efe87a95 100644
--- a/ace/Event_Handler.h
+++ b/ace/Event_Handler.h
@@ -53,7 +53,12 @@ public:
EXCEPT_MASK = 0x2,
#endif /* ACE_USE_POLL */
ACCEPT_MASK = 0x8,
- TIMER_MASK = 0x10,
+ CONNECT_MASK = READ_MASK | WRITE_MASK
+#if defined (ACE_WIN32)
+ | EXCEPT_MASK
+#endif /* ACE_WIN32 */
+ ,
+ TIMER_MASK = 0x12,
ALL_EVENTS_MASK = READ_MASK | WRITE_MASK | EXCEPT_MASK | ACCEPT_MASK,
RWE_MASK = ALL_EVENTS_MASK,
DONT_CALL = 0x100
diff --git a/ace/Svc_Handler.cpp b/ace/Svc_Handler.cpp
index 0fb42db14f2..49a5532d0d5 100644
--- a/ace/Svc_Handler.cpp
+++ b/ace/Svc_Handler.cpp
@@ -146,7 +146,7 @@ ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_2>::shutdown (void)
// Deregister this handler with the ACE_Reactor.
if (this->reactor ())
{
- ACE_Reactor_Mask mask = ACE_Event_Handler::WRITE_MASK |
+ ACE_Reactor_Mask mask = ACE_Event_Handler::WRITE_MASK |
ACE_Event_Handler::READ_MASK |
ACE_Event_Handler::DONT_CALL;
diff --git a/ace/Svc_Handler.h b/ace/Svc_Handler.h
index 7864ee37569..9eb192d50a3 100644
--- a/ace/Svc_Handler.h
+++ b/ace/Svc_Handler.h
@@ -99,9 +99,10 @@ public:
virtual void destroy (void);
// Call this instead of <delete> to free up dynamically allocated
- // <Svc_Handler>. This method knows whether or not the object was
- // allocated dynamically, and can act accordingly (i.e., deleting it
- // if it was allocated dynamically, otherwise ignoring it).
+ // <Svc_Handlers> (otherwise you will get memory leaks). This
+ // method knows whether or not the object was allocated dynamically,
+ // and can act accordingly (i.e., deleting it if it was allocated
+ // dynamically, otherwise ignoring it).
void *operator new (size_t n);
// Overloaded new operator. This is used to unobtrusively detect
@@ -114,7 +115,8 @@ public:
void operator delete (void *);
// This really should be private so that users are forced to call
- // destroy().
+ // destroy(). Unfortunately, the C++ standard doesn't allow there
+ // to be a public new and a private delete.
private:
void shutdown (void);