ASF Bugzilla – Attachment 25708 Details for
Bug 49553
Set QoS bits via APR2 API instead
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-qos.patch (text/plain), 1.23 KB, created by
Philip Prindeville
on 2010-07-05 13:36:52 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:
2010-07-05 13:36:52 UTC
Size:
1.23 KB
patch
obsolete
>Index: modules/ftp/ftp_data_connection.c >=================================================================== >--- modules/ftp/ftp_data_connection.c (revision 960641) >+++ modules/ftp/ftp_data_connection.c (working copy) >@@ -27,7 +27,7 @@ > #if APR_HAVE_SYS_SOCKET_H > #include <sys/socket.h> > #endif >-#ifdef HAVE_NETINET_IP_H >+#if APR_HAVE_NETINET_IP_H > #include <netinet/ip.h> > #endif > >@@ -66,9 +66,7 @@ > 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,14 +170,9 @@ > 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 >+#ifdef APR_SO_IPTOS >+ rv = apr_socket_opt_set(fc->datasock, APR_SO_IPTOS, sopt); >+ if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) { > ap_log_error(APLOG_MARK, APLOG_ERR, errno, r->server, > "Failed to set TOS priority"); > }
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 49553
: 25708