cvs: pecl /apc php_apc.c
| From: | Rasmus Lerdorf | Date: | Mon, 13 Jun 2005 14:01:00 +0000 |
| Subject: | cvs: pecl /apc php_apc.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-3266@lists.php.net to get a copy of this message | ||
rasmus Mon Jun 13 10:01:00 2005 EDT
Modified files:
/pecl/apc php_apc.c
Log:
Oops, init it first
http://cvs.php.net/diff.php/pecl/apc/php_apc.c?r1=3.43&r2=3.44&ty=u
Index: pecl/apc/php_apc.c
diff -u pecl/apc/php_apc.c:3.43 pecl/apc/php_apc.c:3.44
--- pecl/apc/php_apc.c:3.43 Fri Apr 8 16:25:38 2005
+++ pecl/apc/php_apc.c Mon Jun 13 10:01:00 2005
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_apc.c,v 3.43 2005/04/08 20:25:38 rasmus Exp $ */
+/* $Id: php_apc.c,v 3.44 2005/06/13 14:01:00 rasmus Exp $ */
#ifdef PHP_WIN32
/* XXX lame hack, for some reason, the ini entries are all messed
@@ -126,7 +126,7 @@
#else
php_info_print_table_row(2, "MMAP Support", "Disabled");
#endif
- php_info_print_table_row(2, "Revision", "$Revision: 3.43 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 3.44 $");
php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__);
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
@@ -348,12 +348,6 @@
apc_cache_key_t key;
time_t t;
- if (!(entry = apc_cache_make_user_entry(strkey, val, ttl))) {
- apc_cache_expunge(APCG(cache),t);
- apc_cache_expunge(APCG(user_cache),t);
- return 0;
- }
-
#if HAVE_APACHE
/* Save a syscall here under Apache. This should actually be a SAPI call instead
* but we don't have that yet. Once that is introduced in PHP this can be cleaned up
-Rasmus */
@@ -362,6 +356,12 @@
t = time(0);
#endif
+ if (!(entry = apc_cache_make_user_entry(strkey, val, ttl))) {
+ apc_cache_expunge(APCG(cache),t);
+ apc_cache_expunge(APCG(user_cache),t);
+ return 0;
+ }
+
if (!apc_cache_make_user_key(&key, strkey, t)) {
apc_cache_free_entry(entry);
apc_cache_expunge(APCG(cache),t);