|
cvs: pecl /apc apc_cache.c apc_main.c: msg#00179php.pecl.cvs
rasmus Sun Jul 24 16:44:05 2005 EDT Modified files: /pecl/apc apc_cache.c apc_main.c Log: Make it a bit easier for embed and other extensions to use the cache by falling back to file_handle->filename http://cvs.php.net/diff.php/pecl/apc/apc_cache.c?r1=3.86&r2=3.87&ty=u Index: pecl/apc/apc_cache.c diff -u pecl/apc/apc_cache.c:3.86 pecl/apc/apc_cache.c:3.87 --- pecl/apc/apc_cache.c:3.86 Sun Jul 24 14:01:27 2005 +++ pecl/apc/apc_cache.c Sun Jul 24 16:44:03 2005 @@ -28,7 +28,7 @@ */ -/* $Id: apc_cache.c,v 3.86 2005/07/24 18:01:27 helly Exp $ */ +/* $Id: apc_cache.c,v 3.87 2005/07/24 20:44:03 rasmus Exp $ */ #include "apc_cache.h" #include "apc_lock.h" @@ -680,6 +680,9 @@ entry->data.file.filename = apc_xstrdup(filename, apc_sma_malloc); if(!entry->data.file.filename) { +#ifdef __DEBUG_APC__ + fprintf(stderr,"apc_cache_make_file_entry: entry->data.file.filename is NULL - bailing\n"); +#endif apc_sma_free(entry); return NULL; } http://cvs.php.net/diff.php/pecl/apc/apc_main.c?r1=3.49&r2=3.50&ty=u Index: pecl/apc/apc_main.c diff -u pecl/apc/apc_main.c:3.49 pecl/apc/apc_main.c:3.50 --- pecl/apc/apc_main.c:3.49 Fri Jul 22 12:13:26 2005 +++ pecl/apc/apc_main.c Sun Jul 24 16:44:04 2005 @@ -28,7 +28,7 @@ */ -/* $Id: apc_main.c,v 3.49 2005/07/22 16:13:26 rasmus Exp $ */ +/* $Id: apc_main.c,v 3.50 2005/07/24 20:44:04 rasmus Exp $ */ #include "apc_php.h" #include "apc_main.h" @@ -216,6 +216,7 @@ apc_function_t* alloc_functions; apc_class_t* alloc_classes; time_t t; + char *path; if (!APCG(enabled)) { #ifdef __DEBUG_APC__ @@ -317,7 +318,10 @@ return op_array; } - if(!(cache_entry = apc_cache_make_file_entry(h->opened_path, alloc_op_array, alloc_functions, alloc_classes))) { + path = h->opened_path; + if(!path) path=h->filename; + + if(!(cache_entry = apc_cache_make_file_entry(path, alloc_op_array, alloc_functions, alloc_classes))) { apc_free_op_array(alloc_op_array, apc_sma_free); apc_free_functions(alloc_functions, apc_sma_free); apc_free_classes(alloc_classes, apc_sma_free); |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | cvs: pecl /http/tests get_request_data_001.phpt: 00179, Michael Wallner |
|---|---|
| Next by Date: | cvs: pecl /apc apc_main.c: 00179, Rasmus Lerdorf |
| Previous by Thread: | cvs: pecl /http/tests get_request_data_001.phpti: 00179, Michael Wallner |
| Next by Thread: | cvs: pecl /http/tests HttpRequestPool_001.phpt HttpRequest_002.phpt HttpRequest_003.phpt: 00179, Michael Wallner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |