+++ /dev/null
-diff -burN bw_mod-0.6.orig/bw_mod-0.6.c bw_mod-0.6/bw_mod-0.6.c
---- bw_mod-0.6.orig/bw_mod-0.6.c 2005-03-12 14:28:51.665241352 +0100
-+++ bw_mod-0.6/bw_mod-0.6.c 2005-03-12 14:32:46.305570600 +0100
-@@ -510,7 +510,7 @@
- nowtime = apr_time_now();
- if ( bwstat->time < (nowtime - 1000000) ) {
- /* And if we got lock */
-- if ( apr_atomic_cas( &bwstat->lock, 1, 0 ) == 0 ) {
-+ if ( apr_atomic_cas32( &bwstat->lock, 1, 0 ) == 0 ) {
-
- /* Calculate bw used in the last timeinterval */
- bwstat->bandwidth = ( bwstat->bytes_count / (double)(nowtime - bwstat->time)) * 1000000 ;
-@@ -522,7 +522,7 @@
- bwstat->time = apr_time_now();
-
- /* Release lock */
-- apr_atomic_set( &bwstat->lock, 0 );
-+ apr_atomic_set32( &bwstat->lock, 0 );
- }
- }
- }
-@@ -653,7 +653,7 @@
- else bwmaxconn = bwstat;
-
- /* Add 1 active connection to the record */
-- apr_atomic_inc( &bwmaxconn->connection_count );
-+ apr_atomic_inc32( &bwmaxconn->connection_count );
-
- /* Verbose Output */
- if (sconf->debug == BANDWIDTH_ENABLED) {
-@@ -682,7 +682,7 @@
- ap_pass_brigade(f->next, ctx->bb);
-
- /* Delete 1 active connection */
-- apr_atomic_dec( &bwmaxconn->connection_count );
-+ apr_atomic_dec32( &bwmaxconn->connection_count );
- return APR_SUCCESS;
- }
-
-@@ -750,14 +750,14 @@
- b = APR_BRIGADE_FIRST(bb);
-
- /* Add the number of bytes transferred, so we can get an estimated bw usage */
-- apr_atomic_add( &bwstat->bytes_count, packet);
-+ apr_atomic_add32( &bwstat->bytes_count, packet);
-
- /* If the connection goes to hell... go with it ! */
- if (r->connection->aborted) {
- /* Verbose. Tells when the connection was ended */
- if (sconf->debug == BANDWIDTH_ENABLED)
- ap_log_error(APLOG_MARK, APLOG_NOTICE|APLOG_NOERRNO, 0,NULL,"[W] Connection to hell");
-- apr_atomic_dec( &bwmaxconn->connection_count );
-+ apr_atomic_dec32( &bwmaxconn->connection_count );
- return APR_SUCCESS;
- }
-
-@@ -774,14 +774,14 @@
- b = APR_BRIGADE_FIRST(bb);
-
- /* Add the number of bytes to the counter */
-- apr_atomic_add( &bwstat->bytes_count, bytes);
-+ apr_atomic_add32( &bwstat->bytes_count, bytes);
-
- /* Pass the final brigade */
- ap_pass_brigade(f->next, ctx->bb);
- }
-
- /* Delete 1 active connection to the record */
-- apr_atomic_dec( &bwmaxconn->connection_count );
-+ apr_atomic_dec32( &bwmaxconn->connection_count );
-
- /* Verbose, tells when we ended the Filter */
- if (sconf->debug == BANDWIDTH_ENABLED)
Summary: Apache module: bandwidth limits
Summary(pl.UTF-8): Moduł do Apache: limity pasma
Name: apache-mod_%{mod_name}
-Version: 0.6
-Release: 3
+Version: 0.92
+Release: 1
License: Apache
Group: Networking/Daemons/HTTP
-Source0: http://www.ivn.cl/apache/bw_mod-%{version}.tgz
-# Source0-md5: 0c92fa6344f487321291a592dbb49856
+Source0: http://ivn.cl/files/source/mod_bw-%{version}.tgz
+# Source0-md5: 90f5e632dad5de8d49dcdb61453dcf97
Source1: %{name}.conf
-Patch0: %{name}-apr_1.0.patch
URL: http://www.ivn.cl/apache/
BuildRequires: %{apxs}
BuildRequires: apache-devel >= 2.0.0
katalogu, wielkości plików lub zdalnym IP/domenie.
%prep
-%setup -q -n bw_mod-%{version}
-%patch0 -p1
-sed -i -e 's@include "apr@include "apr/apr@g' bw_mod-%{version}.c
-sed -i -e 's@^.*apr_buckets.h.*$@@' bw_mod-%{version}.c
+%setup -qc
%build
-%{apxs} -c bw_mod-%{version}.c
+%{apxs} -c mod_bw.c
%install
rm -rf $RPM_BUILD_ROOT
$RPM_BUILD_ROOT%{_var}/run/%{name}/{link,master} \
$RPM_BUILD_ROOT{/etc/cron.d,%{_sbindir}}
-install .libs/bw_mod-%{version}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/97_mod_%{mod_name}.conf
+install -p .libs/mod_bw.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/97_mod_%{mod_name}.conf
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc bw_mod-%{version}.txt LICENSE
+%doc mod_bw.txt LICENSE ChangeLog
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
%attr(755,root,root) %{_pkglibdir}/*.so
#%config(noreplace) %verify(not size mtime md5) %attr(640,root,root) /etc/cron.d/%{name}