diff options
author | Johannes Schlüter <johannes@php.net> | 2012-05-08 17:30:05 +0200 |
---|---|---|
committer | Johannes Schlüter <johannes@php.net> | 2012-05-08 17:30:05 +0200 |
commit | e8e661128a4dcee9d2f35ed3443d567ba2ad7870 (patch) | |
tree | 2b2791a817b15c3c10e423a2e2e84b509ad7d8b5 /ext/mysqlnd/php_mysqlnd.c | |
parent | fb3b6bcf8384c375ddffce85d5e652ec609ccf7a (diff) | |
download | php-git-e8e661128a4dcee9d2f35ed3443d567ba2ad7870.tar.gz |
Fix #61704 (Crash apache, phpinfo() threading issue)
Diffstat (limited to 'ext/mysqlnd/php_mysqlnd.c')
-rw-r--r-- | ext/mysqlnd/php_mysqlnd.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/ext/mysqlnd/php_mysqlnd.c b/ext/mysqlnd/php_mysqlnd.c index 1022285ad7..20fcc5e7ad 100644 --- a/ext/mysqlnd/php_mysqlnd.c +++ b/ext/mysqlnd/php_mysqlnd.c @@ -135,16 +135,22 @@ mysqlnd_minfo_dump_loaded_plugins(void *pDest, void * buf TSRMLS_DC) /* }}} */ /* {{{ mysqlnd_minfo_dump_api_plugins */ -static int -mysqlnd_minfo_dump_api_plugins(void * pDest, void * buf TSRMLS_DC) +static void +mysqlnd_minfo_dump_api_plugins(smart_str * buffer TSRMLS_DC) { - smart_str * buffer = (smart_str *) buf; - MYSQLND_REVERSE_API * ext = *(MYSQLND_REVERSE_API **) pDest; - if (buffer->len) { - smart_str_appendc(buffer, ','); + HashTable *ht = mysqlnd_reverse_api_get_api_list(TSRMLS_C); + Bucket *p; + + p = ht->pListHead; + while(p != NULL) { + MYSQLND_REVERSE_API * ext = *(MYSQLND_REVERSE_API **) p->pData; + if (buffer->len) { + smart_str_appendc(buffer, ','); + } + smart_str_appends(buffer, ext->module->name); + + p = p->pListNext; } - smart_str_appends(buffer, ext->module->name); - return ZEND_HASH_APPLY_KEEP; } /* }}} */ @@ -189,7 +195,7 @@ PHP_MINFO_FUNCTION(mysqlnd) php_info_print_table_row(2, "Loaded plugins", tmp_str.c); smart_str_free(&tmp_str); - zend_hash_apply_with_argument(mysqlnd_reverse_api_get_api_list(TSRMLS_C), mysqlnd_minfo_dump_api_plugins, &tmp_str TSRMLS_CC); + mysqlnd_minfo_dump_api_plugins(&tmp_str TSRMLS_CC); smart_str_0(&tmp_str); php_info_print_table_row(2, "API Extensions", tmp_str.c); smart_str_free(&tmp_str); |