bjh 2002/07/16 07:34:04
Modified: network_io/os2 sendrecv_udp.c
Log:
OS/2: Prevent duplicate symbol apr_wait_for_io_or_timeout by eliminating a
local version & using the general purpose one in support/unix/waitio.c
instead.
Revision Changes Path
1.6 +3 -23 apr/network_io/os2/sendrecv_udp.c
Index: sendrecv_udp.c
===================================================================
RCS file: /home/cvs/apr/network_io/os2/sendrecv_udp.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sendrecv_udp.c 10 Jul 2002 06:01:12 -0000 1.5
+++ sendrecv_udp.c 16 Jul 2002 14:34:03 -0000 1.6
@@ -56,30 +56,10 @@
#include "apr_errno.h"
#include "apr_general.h"
#include "apr_network_io.h"
+#include "apr_support.h"
#include "apr_lib.h"
#include <sys/time.h>
-apr_status_t apr_wait_for_io_or_timeout(apr_socket_t *sock, int for_read)
-{
- int waitsock = sock->socketdes;
- int srv;
-
- do {
- waitsock = sock->socketdes;
- srv = select(&waitsock, for_read > 0, !for_read, 0, sock->timeout /
1000);
- } while (srv < 0 && sock_errno() == SOCEINTR);
-
- if (srv == 0) {
- return APR_TIMEUP;
- }
- else if (srv < 0) {
- return APR_FROM_OS_ERROR(sock_errno());
- }
-
- return APR_SUCCESS;
-}
-
-
APR_DECLARE(apr_status_t) apr_sendto(apr_socket_t *sock, apr_sockaddr_t
*where,
apr_int32_t flags, const char *buf,
apr_size_t *len)
@@ -94,7 +74,7 @@
} while (rv == -1 && (serrno = sock_errno()) == EINTR);
if (rv == -1 && serrno == SOCEWOULDBLOCK && sock->timeout != 0) {
- apr_status_t arv = apr_wait_for_io_or_timeout(sock, 0);
+ apr_status_t arv = apr_wait_for_io_or_timeout(NULL, sock, 0);
if (arv != APR_SUCCESS) {
*len = 0;
@@ -132,7 +112,7 @@
} while (rv == -1 && (serrno = sock_errno()) == EINTR);
if (rv == -1 && serrno == SOCEWOULDBLOCK && sock->timeout != 0) {
- apr_status_t arv = apr_wait_for_io_or_timeout(sock, 1);
+ apr_status_t arv = apr_wait_for_io_or_timeout(NULL, sock, 1);
if (arv != APR_SUCCESS) {
*len = 0;