aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2012-05-11 17:26:08 +0800
committerale <ale@FreeBSD.org>2012-05-11 17:26:08 +0800
commit2dc75b7d203af26cbdf9578e3f040e903cc4b6b3 (patch)
treea51f08e8be5fdd6a046e9a3cf3d59d64dd2b6034 /www
parent0688b96c1b2fd0598958988f086c2de23322bb81 (diff)
downloadfreebsd-ports-gnome-2dc75b7d203af26cbdf9578e3f040e903cc4b6b3.tar.gz
freebsd-ports-gnome-2dc75b7d203af26cbdf9578e3f040e903cc4b6b3.tar.zst
freebsd-ports-gnome-2dc75b7d203af26cbdf9578e3f040e903cc4b6b3.zip
Bugfix.
PR: ports/167774 Submitted by: mm
Diffstat (limited to 'www')
-rw-r--r--www/xcache/Makefile1
-rw-r--r--www/xcache/files/patch-xcache.c48
2 files changed, 49 insertions, 0 deletions
diff --git a/www/xcache/Makefile b/www/xcache/Makefile
index 61e70e39ee53..282944d52704 100644
--- a/www/xcache/Makefile
+++ b/www/xcache/Makefile
@@ -7,6 +7,7 @@
PORTNAME= xcache
DISTVERSION= 2.0.0
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://xcache.lighttpd.net/pub/Releases/${DISTVERSION}/
diff --git a/www/xcache/files/patch-xcache.c b/www/xcache/files/patch-xcache.c
new file mode 100644
index 000000000000..0f68cb478571
--- /dev/null
+++ b/www/xcache/files/patch-xcache.c
@@ -0,0 +1,48 @@
+Index: xcache.c
+===================================================================
+--- xcache.c (revision 899)
++++ xcache.c (revision 900)
+@@ -839,7 +839,7 @@
+ while (xc_stack_count(s)) {
+ entry_php = (xc_entry_php_t *) xc_stack_pop(s);
+ TRACE("unhold %d:%s", entry_php->file_inode, entry_php->entry.name.str.val);
+- entry_php->refcount ++;
++ --entry_php->refcount;
+ assert(entry_php->refcount >= 0);
+ }
+ } LEAVE_LOCK(cache);
+@@ -1939,11 +1939,16 @@
+
+ if (stored_php) {
+ compiler->new_entry.php = stored_php;
+- xc_php_addref_unlocked(stored_php);
+ xc_entry_php_init(&compiler->new_entry, compiler->opened_path TSRMLS_CC);
+ stored_entry = xc_entry_php_store_unlocked(cache, compiler->entry_hash.entryslotid, &compiler->new_entry TSRMLS_CC);
+- TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
+- xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
++ if (stored_entry) {
++ xc_php_addref_unlocked(stored_php);
++ TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
++ xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
++ }
++ else {
++ gaveup = 1;
++ }
+ break;
+ }
+
+@@ -2021,10 +2026,11 @@
+ }
+ /* entry_store */
+ compiler->new_entry.php = stored_php;
+- xc_php_addref_unlocked(stored_php);
+ stored_entry = xc_entry_php_store_unlocked(cache, compiler->entry_hash.entryslotid, &compiler->new_entry TSRMLS_CC);
+- if (!stored_entry) {
+- xc_php_release_unlocked(cache, stored_php);
++ if (stored_entry) {
++ xc_php_addref_unlocked(stored_php);
++ TRACE(" cached %d:%s, holding", compiler->new_entry.file_inode, stored_entry->entry.name.str.val);
++ xc_entry_hold_php_unlocked(cache, stored_entry TSRMLS_CC);
+ }
+ } LEAVE_LOCK_EX(cache);
+ /* }}} */