projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (from parent 1:
db5299a
)
- fix typo which may cause a crash
author
Michael Wallner
<mike@php.net>
Wed, 26 Sep 2007 06:18:50 +0000
(06:18 +0000)
committer
Michael Wallner
<mike@php.net>
Wed, 26 Sep 2007 06:18:50 +0000
(06:18 +0000)
- improve debugging code
http_persistent_handle_api.c
patch
|
blob
|
history
diff --git
a/http_persistent_handle_api.c
b/http_persistent_handle_api.c
index ec345fb6a8b88ac413acf75ac683a789b8ed73a5..c31ead1de44da65e05adf9119779c4b53d1041ea 100644
(file)
--- a/
http_persistent_handle_api.c
+++ b/
http_persistent_handle_api.c
@@
-20,6
+20,10
@@
#ifndef HTTP_DEBUG_PHANDLES
# define HTTP_DEBUG_PHANDLES 0
#endif
#ifndef HTTP_DEBUG_PHANDLES
# define HTTP_DEBUG_PHANDLES 0
#endif
+#if HTTP_DEBUG_PHANDLES
+# undef inline
+# define inline
+#endif
static HashTable http_persistent_handles_hash;
#ifdef ZTS
static HashTable http_persistent_handles_hash;
#ifdef ZTS
@@
-98,7
+102,7
@@
static inline http_persistent_handle_list *http_persistent_handle_list_find(http
}
if ((new_list = http_persistent_handle_list_init(NULL))) {
}
if ((new_list = http_persistent_handle_list_init(NULL))) {
- if (SUCCESS == zend_hash_quick_add(&provider->list.free, HTTP_G->persistent.handles.ident.s, HTTP_G->persistent.handles.ident.l, HTTP_G->persistent.handles.ident.h, (void *) &new_list, sizeof(http_persistent_handle_list
*
), (void *) &list)) {
+ if (SUCCESS == zend_hash_quick_add(&provider->list.free, HTTP_G->persistent.handles.ident.s, HTTP_G->persistent.handles.ident.l, HTTP_G->persistent.handles.ident.h, (void *) &new_list, sizeof(http_persistent_handle_list), (void *) &list)) {
return *list;
}
http_persistent_handle_list_free(&new_list, provider->dtor);
return *list;
}
http_persistent_handle_list_free(&new_list, provider->dtor);
@@
-250,6
+254,9
@@
PHP_HTTP_API STATUS _http_persistent_handle_release_ex(const char *name_str, siz
{
STATUS status = FAILURE;
http_persistent_handle_provider *provider;
{
STATUS status = FAILURE;
http_persistent_handle_provider *provider;
+#if HTTP_DEBUG_PHANDLES
+ void *handle_tmp = *handle_ptr;
+#endif
LOCK();
if (SUCCESS == zend_hash_find(&http_persistent_handles_hash, (char *) name_str, name_len+1, (void *) &provider)) {
LOCK();
if (SUCCESS == zend_hash_find(&http_persistent_handles_hash, (char *) name_str, name_len+1, (void *) &provider)) {
@@
-258,7
+265,7
@@
PHP_HTTP_API STATUS _http_persistent_handle_release_ex(const char *name_str, siz
UNLOCK();
#if HTTP_DEBUG_PHANDLES
UNLOCK();
#if HTTP_DEBUG_PHANDLES
- fprintf(stderr, "RELEASE: %p (%s)\n",
*handle_ptr
, name_str);
+ fprintf(stderr, "RELEASE: %p (%s)\n",
handle_tmp
, name_str);
#endif
return status;
#endif
return status;