summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2000-05-26 00:51:08 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2000-05-26 00:51:08 +0000
commitde4e74915e90c05539bfb0034c1626d612b76675 (patch)
treead3655aa3646d409af024c87ebb526926ea0836a
parentfef933b02cdc36feb971015984de2cdd0353d5d7 (diff)
downloadATCD-de4e74915e90c05539bfb0034c1626d612b76675.tar.gz
ChangeLogTag:Thu May 25 17:47:08 2000 Ossama Othman <ossama@uci.edu>
-rw-r--r--examples/IPC_SAP/SSL_SAP/SSL-server.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/examples/IPC_SAP/SSL_SAP/SSL-server.cpp b/examples/IPC_SAP/SSL_SAP/SSL-server.cpp
index c9b6457cec4..1179a5c9a16 100644
--- a/examples/IPC_SAP/SSL_SAP/SSL-server.cpp
+++ b/examples/IPC_SAP/SSL_SAP/SSL-server.cpp
@@ -324,6 +324,8 @@ run_event_loop (u_short port)
handle_set.set_bit (twoway_acceptor.get_handle ());
handle_set.set_bit (oneway_acceptor.get_handle ());
+ ACE_SSL_SOCK_Stream * new_stream = 0;
+
// Performs the iterative server activities.
for (;;)
@@ -359,13 +361,12 @@ run_event_loop (u_short port)
// methods/operators. However, the user must ensure that
// the copy or assignment is atomic.
- ACE_SSL_SOCK_Stream * new_stream = 0;
- ACE_NEW_RETURN (new_stream,
- ACE_SSL_SOCK_Stream,
- -1);
-
if (temp.is_set (twoway_acceptor.get_handle ()))
{
+ ACE_NEW_RETURN (new_stream,
+ ACE_SSL_SOCK_Stream,
+ -1);
+
if (twoway_acceptor.accept (*new_stream) == -1)
{
ACE_ERROR ((LM_ERROR,
@@ -386,6 +387,10 @@ run_event_loop (u_short port)
}
if (temp.is_set (oneway_acceptor.get_handle ()))
{
+ ACE_NEW_RETURN (new_stream,
+ ACE_SSL_SOCK_Stream,
+ -1);
+
if (oneway_acceptor.accept (*new_stream) == -1)
{
ACE_ERROR ((LM_ERROR, "%p\n", "accept"));