summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2002-07-15 10:05:11 +0200
committerWilliam A. Rowe Jr <wrowe@apache.org>2002-07-15 10:05:11 +0200
commited8fc9abaef1ff689c07588d2599be85353f0e86 (patch)
tree4f5545d23ddf88bbf9c4c778c3bc7b76ad71e933 /modules
parentRemove a time lookup that's now unnecessary (diff)
downloadapache2-ed8fc9abaef1ff689c07588d2599be85353f0e86.tar.xz
apache2-ed8fc9abaef1ff689c07588d2599be85353f0e86.zip
http occurances to update for apr_socket_opt_get/set
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96057 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r--modules/http/http_core.c2
-rw-r--r--modules/proxy/proxy_ftp.c28
-rw-r--r--modules/proxy/proxy_util.c6
3 files changed, 20 insertions, 16 deletions
diff --git a/modules/http/http_core.c b/modules/http/http_core.c
index 9bbcdfcfd5..d55e893aa6 100644
--- a/modules/http/http_core.c
+++ b/modules/http/http_core.c
@@ -308,7 +308,7 @@ static int ap_process_http_connection(conn_rec *c)
csd = ap_get_module_config(c->conn_config, &core_module);
csd_set = 1;
}
- apr_setsocketopt(csd, APR_INCOMPLETE_READ, 1);
+ apr_socket_opt_set(csd, APR_INCOMPLETE_READ, 1);
}
return OK;
diff --git a/modules/proxy/proxy_ftp.c b/modules/proxy/proxy_ftp.c
index e05a92812c..5ae5b28a51 100644
--- a/modules/proxy/proxy_ftp.c
+++ b/modules/proxy/proxy_ftp.c
@@ -951,17 +951,18 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf,
#if !defined(TPF) && !defined(BEOS)
if (conf->recv_buffer_size > 0
- && (rv = apr_setsocketopt(sock, APR_SO_RCVBUF,
- conf->recv_buffer_size))) {
+ && (rv = apr_socket_opt_set(sock, APR_SO_RCVBUF,
+ conf->recv_buffer_size))) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "setsockopt(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
+ "apr_socket_opt_set(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
}
#endif
- if (APR_SUCCESS != (rv = apr_setsocketopt(sock, APR_SO_REUSEADDR, one))) {
+ if ((rv = apr_socket_opt_set(sock, APR_SO_REUSEADDR, one))
+ != APR_SUCCESS) {
#ifndef _OSD_POSIX /* BS2000 has this option "always on" */
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: FTP: error setting reuseaddr option: setsockopt(SO_REUSEADDR)");
+ "proxy: FTP: error setting reuseaddr option: apr_socket_opt_set(SO_REUSEADDR)");
return HTTP_INTERNAL_SERVER_ERROR;
#endif /* _OSD_POSIX */
}
@@ -1288,10 +1289,11 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf,
}
#if !defined (TPF) && !defined(BEOS)
- if (conf->recv_buffer_size > 0 && (rv = apr_setsocketopt(data_sock, APR_SO_RCVBUF,
- conf->recv_buffer_size))) {
+ if (conf->recv_buffer_size > 0
+ && (rv = apr_socket_opt_set(data_sock, APR_SO_RCVBUF,
+ conf->recv_buffer_size))) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: FTP: setsockopt(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
+ "proxy: FTP: apr_socket_opt_set(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
}
#endif
@@ -1374,10 +1376,11 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf,
}
#if !defined (TPF) && !defined(BEOS)
- if (conf->recv_buffer_size > 0 && (rv = apr_setsocketopt(data_sock, APR_SO_RCVBUF,
- conf->recv_buffer_size))) {
+ if (conf->recv_buffer_size > 0
+ && (rv = apr_socket_opt_set(data_sock, APR_SO_RCVBUF,
+ conf->recv_buffer_size))) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "proxy: FTP: setsockopt(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
+ "proxy: FTP: apr_socket_opt_set(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
}
#endif
@@ -1418,7 +1421,8 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf,
apr_sockaddr_port_get(&local_port, local_addr);
apr_sockaddr_ip_get(&local_ip, local_addr);
- if ((rv = apr_setsocketopt(local_sock, APR_SO_REUSEADDR, one)) != APR_SUCCESS) {
+ if ((rv = apr_socket_opt_set(local_sock, APR_SO_REUSEADDR, one))
+ != APR_SUCCESS) {
#ifndef _OSD_POSIX /* BS2000 has this option "always on" */
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
"proxy: FTP: error setting reuseaddr option");
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c
index 3d0a4ffb90..d40abb873d 100644
--- a/modules/proxy/proxy_util.c
+++ b/modules/proxy/proxy_util.c
@@ -1148,10 +1148,10 @@ PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **newsock,
#if !defined(TPF) && !defined(BEOS)
if (conf->recv_buffer_size > 0 &&
- (rv = apr_setsocketopt(*newsock, APR_SO_RCVBUF,
- conf->recv_buffer_size))) {
+ (rv = apr_socket_opt_set(*newsock, APR_SO_RCVBUF,
+ conf->recv_buffer_size))) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
- "setsockopt(SO_RCVBUF): Failed to set "
+ "apr_socket_opt_set(SO_RCVBUF): Failed to set "
"ProxyReceiveBufferSize, using default");
}
#endif