ASF Bugzilla – Attachment 24687 Details for
Bug 42848
add IP TOS support to apr_socket_opt_set()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to have mod_ftp use the apr_socket_opt_set() interface for IP ToS
mod_ftp-iptos.patch (text/plain), 1.23 KB, created by
Philip Prindeville
on 2009-12-09 21:50:48 UTC
(
hide
)
Description:
Patch to have mod_ftp use the apr_socket_opt_set() interface for IP ToS
Filename:
MIME Type:
Creator:
Philip Prindeville
Created:
2009-12-09 21:50:48 UTC
Size:
1.23 KB
patch
obsolete
>--- httpd/mod_ftp/trunk/modules/ftp/ftp_data_connection.c.orig 2009-11-04 01:26:54.000000000 -0800 >+++ httpd/mod_ftp/trunk/modules/ftp/ftp_data_connection.c 2009-12-09 21:47:02.000000000 -0800 >@@ -66,9 +66,7 @@ static apr_status_t ftp_open_datasock(re > apr_socket_t *s; > apr_status_t rv, res; > int n; >-#ifdef HAVE_SOL_IP_H >- int sd, sopt; >-#endif >+ const int sopt = IPTOS_THROUGHPUT; > > /* > * handle err condition when the creation of the socket had failed, this >@@ -172,18 +170,11 @@ static apr_status_t ftp_open_datasock(re > fc->passive_created = -1; > } > >-#ifdef HAVE_SOL_IP_H >- sopt = IPTOS_THROUGHPUT; >- if (((apr_os_sock_get(&sd, fc->datasock)) == APR_SUCCESS) && >-#ifdef HAVE_SOL_IP >- (setsockopt(sd, SOL_IP, IP_TOS, &sopt, sizeof(sopt)) < 0)) { >-#else >- (setsockopt(sd, IPPROTO_IP, IP_TOS, &sopt, sizeof(sopt)) < 0)) { >-#endif >+ rv = apr_socket_set_opt(fc->datasock, APR_SO_IPTOS, sopt); >+ if (rv != APR_SUCCESS && rv != APR_NOTIMPL) { > ap_log_error(APLOG_MARK, APLOG_ERR, errno, r->server, > "Failed to set TOS priority"); > } >-#endif > > rv = apr_socket_opt_set(fc->datasock, APR_SO_LINGER, > APR_MAX_SECS_TO_LINGER);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 42848
:
24685
|
24687
|
25156
|
25211
|
25699
|
25700
|
27793