diff options
-rw-r--r-- | ChangeLog-97a | 14 | ||||
-rw-r--r-- | examples/ASX/Event_Server/Transceiver/transceiver.cpp | 5 | ||||
-rw-r--r-- | examples/Connection/blocking/SPIPE-connector.cpp | 6 | ||||
-rw-r--r-- | examples/Connection/misc/test_upipe.cpp | 6 |
4 files changed, 26 insertions, 5 deletions
diff --git a/ChangeLog-97a b/ChangeLog-97a index 1b465610bf4..f99b141a827 100644 --- a/ChangeLog-97a +++ b/ChangeLog-97a @@ -1,3 +1,17 @@ +Sat Apr 12 11:53:49 1997 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * examples/ASX/Event_Server/Transceiver/transceiver.cpp (main): + The first argument to connect () is now a SVC_HANDLER *&. + Therefore, we can no longer allows us to pass the address of a + SVC_HANDLER on the stack (or in the data segment). + Fortunately, the fix is easy, as shown below: + + Event_Transceiver transceiver, *tp = &transceiver; + + connector.connect (tp, ACE_INET_Addr (port_number, host_name)); + + Thanks to David Levine for reporting this problem. + Fri Apr 11 15:14:59 1997 David L. Levine <levine@cs.wustl.edu> * tests/Conn_Test.cpp: moved declaration of "result" out of diff --git a/examples/ASX/Event_Server/Transceiver/transceiver.cpp b/examples/ASX/Event_Server/Transceiver/transceiver.cpp index 44ebbf10ebb..eef5248ee11 100644 --- a/examples/ASX/Event_Server/Transceiver/transceiver.cpp +++ b/examples/ASX/Event_Server/Transceiver/transceiver.cpp @@ -194,10 +194,9 @@ main (int argc, char *argv[]) // Establish the connection. ACE_Connector<Event_Transceiver, ACE_SOCK_CONNECTOR> connector; - Event_Transceiver transceiver; + Event_Transceiver transceiver, *tp = &transceiver; - if (connector.connect (&transceiver, - ACE_INET_Addr (port_number, host_name)) == -1) + if (connector.connect (tp, ACE_INET_Addr (port_number, host_name)) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", host_name), 1); // Run event loop until either the event server shuts down or we get diff --git a/examples/Connection/blocking/SPIPE-connector.cpp b/examples/Connection/blocking/SPIPE-connector.cpp index 9a631de8e58..6520f1136bf 100644 --- a/examples/Connection/blocking/SPIPE-connector.cpp +++ b/examples/Connection/blocking/SPIPE-connector.cpp @@ -116,8 +116,12 @@ IPC_Client::init (int argc, char *argv[]) ACE_DEBUG ((LM_DEBUG, "Opening %s\n", rendezvous_)); + Peer_Handler *ph; + + ACE_NEW_RETURN (ph, Peer_Handler (iterations_), -1); + // Connect to the peer, reusing the local addr if necessary. - if (this->connect (new Peer_Handler (iterations_), + if (this->connect (ph, ACE_SPIPE_Addr (rendezvous_), ACE_Synch_Options::defaults, *((ACE_SPIPE_Addr *) &ACE_Addr::sap_any), diff --git a/examples/Connection/misc/test_upipe.cpp b/examples/Connection/misc/test_upipe.cpp index eb8ca0431b8..eeaffddd864 100644 --- a/examples/Connection/misc/test_upipe.cpp +++ b/examples/Connection/misc/test_upipe.cpp @@ -140,7 +140,11 @@ public: ACE_UPIPE_Addr remote_addr (r_addr); - return this->connect (new Client_Service (this->thr_mgr_), remote_addr); + Client_Service *cs; + + ACE_NEW_RETURN (cs, Client_Service (this->thr_mgr_), -1); + + return this->connect (cs, remote_addr); } private: |