aboutsummaryrefslogtreecommitdiff
path: root/www/mod_bw
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2006-05-16 05:19:27 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2006-05-16 05:19:27 +0000
commit29310b80712d0901a84881fc3f310ddb5ad1bd1f (patch)
tree94e1a932238bc1fb69a5a92318ef9f671393571d /www/mod_bw
parent28ea4b1429cff85acd4866ba4b8018f27e22db1d (diff)
downloadports-29310b80712d0901a84881fc3f310ddb5ad1bd1f.tar.gz
ports-29310b80712d0901a84881fc3f310ddb5ad1bd1f.zip
Notes
Diffstat (limited to 'www/mod_bw')
-rw-r--r--www/mod_bw/Makefile11
-rw-r--r--www/mod_bw/distinfo6
-rw-r--r--www/mod_bw/files/patch-mod_bw.c38
3 files changed, 47 insertions, 8 deletions
diff --git a/www/mod_bw/Makefile b/www/mod_bw/Makefile
index fdf61557ffe8..cc3bc22766be 100644
--- a/www/mod_bw/Makefile
+++ b/www/mod_bw/Makefile
@@ -6,22 +6,23 @@
#
PORTNAME= mod_bw
-PORTVERSION= 0.6
+PORTVERSION= 0.7
CATEGORIES= www
-MASTER_SITES= http://www.ivn.cl/apache/
-DISTNAME= bw_mod-${PORTVERSION}
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= bwmod
EXTRACT_SUFX= .tgz
DIST_SUBDIR= apache2
MAINTAINER= apache@FreeBSD.org
COMMENT= Bandwidth and Connection control per Virtual Host or Directory
+WRKSRC= ${WRKDIR}/mod_bw
USE_APACHE= 20+
AP_FAST_BUILD= YES
AP_GENPLIST= YES
-SRC_FILE= bw_mod-0.6.c
-PORTDOCS= APACHE2-LICENSE LICENSE bw_mod-0.6.txt
+SRC_FILE= mod_bw.c
+PORTDOCS= LICENSE mod_bw.txt
post-install:
@${MKDIR} ${DOCSDIR}
diff --git a/www/mod_bw/distinfo b/www/mod_bw/distinfo
index ba91d5fa9bb3..c61a36775a03 100644
--- a/www/mod_bw/distinfo
+++ b/www/mod_bw/distinfo
@@ -1,3 +1,3 @@
-MD5 (apache2/bw_mod-0.6.tgz) = 0c92fa6344f487321291a592dbb49856
-SHA256 (apache2/bw_mod-0.6.tgz) = 7b99f80cfc1ad2ec895ef7acb1bc2bbea53153057106790e79a2459ec77bab8c
-SIZE (apache2/bw_mod-0.6.tgz) = 50298
+MD5 (apache2/mod_bw-0.7.tgz) = 84b43c95fedabfa93be6b6af2e5f5672
+SHA256 (apache2/mod_bw-0.7.tgz) = 21fe083874ee427887c4d2c3dac630e760aa8c6b97b2f1cbf09c2d853a1c87aa
+SIZE (apache2/mod_bw-0.7.tgz) = 18585
diff --git a/www/mod_bw/files/patch-mod_bw.c b/www/mod_bw/files/patch-mod_bw.c
new file mode 100644
index 000000000000..94ae7bc4954f
--- /dev/null
+++ b/www/mod_bw/files/patch-mod_bw.c
@@ -0,0 +1,38 @@
+--- mod_bw.c.orig Mon Apr 24 03:10:44 2006
++++ mod_bw.c Tue May 16 14:01:56 2006
+@@ -51,6 +51,14 @@
+ #include "http_core.h"
+ #include "scoreboard.h"
+
++#if APR_MAJOR_VERSION == 0
++#define apr_atomic_set32(mem,val) (atomic_set_32(mem,val),mem)
++#define apr_atomic_inc32(mem) (atomic_add_32(mem,1),mem)
++#define apr_atomic_dec32(mem) (atomic_subtract_32(mem,1),mem)
++#define apr_atomic_add32(mem,val) (atomic_add_32(mem,val),mem)
++#define apr_atomic_cas32 apr_atomic_cas
++#endif
++
+ #define MIN_BW 256 /* Minimal bandwidth 256 bytes */
+ #define PACKET 8192 /* Default packet at 8192 bytes */
+
+@@ -715,8 +723,10 @@
+
+ /* If we are too busy, deny connection */
+ confid = get_maxconn(r, conf->maxconnection);
+- if ((bwstat->connection_count >= confid) && (confid > 0))
++ if ((bwstat->connection_count >= confid) && (confid > 0)) {
++ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "exceed lmit (error=%d, count=%d, confid=%d)", conf->error, bwstat->connection_count, confid);
+ return conf->error;
++ }
+ }
+
+ /* Add the Filter, if in forced mode */
+@@ -810,7 +820,7 @@
+
+ /* Verbose Output */
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+- "ID: %ld Directory : %s Rate : %ld Minimum : %ld Size rate : %ld",
++ "ID: %d Directory : %s Rate : %ld Minimum : %ld Size rate : %ld",
+ confid, conf->directory, bw_rate, bw_min, bw_f_rate);
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+ "clients : %d/%d rate/min : %ld,%ld", bwmaxconn->connection_count,