diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2003-12-10 13:16:55 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2003-12-10 13:16:55 +0000 |
commit | 0c9b702c6ece0b41e048217c8d4503a4004e56bc (patch) | |
tree | 10f9e8c29e7ddef5f56185dfe6bf8d738535a6cc | |
parent | 224b335defcb4cc883dc19939da487f5e3935ca1 (diff) | |
download | ATCD-0c9b702c6ece0b41e048217c8d4503a4004e56bc.tar.gz |
ChangeLogTag: Wed Dec 10 13:16:47 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r-- | examples/IPC_SAP/SSL_SAP/SSL-server-poll.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/IPC_SAP/SSL_SAP/SSL-server-poll.cpp b/examples/IPC_SAP/SSL_SAP/SSL-server-poll.cpp index 2ac16efae30..3c1486ff4eb 100644 --- a/examples/IPC_SAP/SSL_SAP/SSL-server-poll.cpp +++ b/examples/IPC_SAP/SSL_SAP/SSL-server-poll.cpp @@ -14,6 +14,8 @@ ACE_RCSID(SSL_SAP, SSL_server_poll, "$Id$") #if defined (ACE_HAS_POLL) +#include "ace/OS_NS_poll.h" + // Should we be verbose? static int verbose = 0; @@ -51,7 +53,7 @@ static int init_buffer (size_t index) { ACE_INT32 len; - + if (ACE::recv_n (poll_array[index].fd, (void *) &len, sizeof (ACE_INT32)) != sizeof (ACE_INT32)) @@ -86,7 +88,7 @@ handle_data (size_t &n_handles) if (ACE_BIT_ENABLED (poll_array[index].revents, POLLIN)) { // First time in, we need to initialize the buffer. - if (buffer_array[index].buf_ == 0 + if (buffer_array[index].buf_ == 0 && init_buffer (index) == -1) { ACE_ERROR ((LM_ERROR, @@ -98,7 +100,7 @@ handle_data (size_t &n_handles) // Read data from client (terminate on error). ssize_t n = ACE::recv (poll_array[index].fd, - buffer_array[index].buf_, + buffer_array[index].buf_, buffer_array[index].len_); // <recv> will not block in this case! |