summaryrefslogtreecommitdiff
path: root/network_io/beos
diff options
context:
space:
mode:
authorDavid Reid <dreid@apache.org>2000-08-26 09:57:41 +0000
committerDavid Reid <dreid@apache.org>2000-08-26 09:57:41 +0000
commit325d1174c04cbe4947ff72a62564f35f7e4bb152 (patch)
tree145941fcb33c930567d2bc7de042d95e10372aa5 /network_io/beos
parent111ff1edbe8d3da497ae68746242246823364ac3 (diff)
downloadapr-325d1174c04cbe4947ff72a62564f35f7e4bb152.tar.gz
Adjust the TCP_NODELAY code for the older BeOS stack...
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60513 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io/beos')
-rw-r--r--network_io/beos/sockopt.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/network_io/beos/sockopt.c b/network_io/beos/sockopt.c
index 5b09dcac0..d6d3656e6 100644
--- a/network_io/beos/sockopt.c
+++ b/network_io/beos/sockopt.c
@@ -108,9 +108,17 @@ apr_status_t apr_setsocketopt(apr_socket_t *sock, apr_int32_t opt, apr_int32_t o
sock->timeout = on;
}
if (opt & APR_TCP_NODELAY) {
- if (setsockopt(sock->socketdes, IPPROTO_TCP, TCP_NODELAY, (void *)&on, sizeof(int)) == -1) {
- return errno;
- }
+ /* BeOS pre-BONE has TCP_NODELAY set to ON by default.
+ * This is a hang over from a long time ago and until BONE there
+ * is no way to turn it off. Use this information as follows...
+ *
+ * on == 0 - return APR_ENOTIMPL
+ * on == 1 - allow it to return APR_SUCCESS
+ *
+ * based on information from Howard Berkey (howard@be.com)
+ */
+ if (! on)
+ return APR_ENOTIMPL;
}
return APR_SUCCESS;
}