mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Fixed bug #5453 (WSA cleanup executes before MSHUTDOWN)
This moves the WSACleanup() call to after zend_shutdown() in main.c, I did some testing and I could not find any issues with this. I don't expect this to cause any issues on Netware either, although untested as I do not have such an env available (do we even support Netware anymore? Last release was in 2009 and it is now discontinued) Besides the movie, then this commit also contains a fix to the check of WSAStartup() where we don't actually confirm we get the desired version of the winsock.dll (We use 2.0).
This commit is contained in:
parent
25437255d7
commit
7813e9de11
2 changed files with 13 additions and 5 deletions
3
NEWS
3
NEWS
|
@ -2,6 +2,9 @@ PHP NEWS
|
||||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||
?? ??? 2016, PHP 7.2.0alpha1
|
?? ??? 2016, PHP 7.2.0alpha1
|
||||||
|
|
||||||
|
- Core:
|
||||||
|
. Fixed bug #54535 (WSA cleanup executes before MSHUTDOWN). (Kalle)
|
||||||
|
|
||||||
- EXIF:
|
- EXIF:
|
||||||
. Added support for vendor specific tags for the following formats: Sony,
|
. Added support for vendor specific tags for the following formats: Sony,
|
||||||
Samsung, DJI & Panasonic. (Kalle)
|
Samsung, DJI & Panasonic. (Kalle)
|
||||||
|
|
15
main/main.c
15
main/main.c
|
@ -2137,6 +2137,11 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
|
||||||
php_printf("\nwinsock.dll unusable. %d\n", WSAGetLastError());
|
php_printf("\nwinsock.dll unusable. %d\n", WSAGetLastError());
|
||||||
return FAILURE;
|
return FAILURE;
|
||||||
}
|
}
|
||||||
|
/* Check that we actually got the requested WSA version */
|
||||||
|
if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 0) {
|
||||||
|
php_printf("\nwinsock.dll unusable. Requested version: %d.%d, got %d.%d", LOBYTE(wVersionRequested), HIBYTE(wVersionRequested), LOBYTE(wsaData.wVersion), HIBYTE(wsaData.wVersion));
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
le_index_ptr = zend_register_list_destructors_ex(NULL, NULL, "index pointer", 0);
|
le_index_ptr = zend_register_list_destructors_ex(NULL, NULL, "index pointer", 0);
|
||||||
|
@ -2387,11 +2392,6 @@ void php_module_shutdown(void)
|
||||||
ts_free_worker_threads();
|
ts_free_worker_threads();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PHP_WIN32) || (defined(NETWARE) && defined(USE_WINSOCK))
|
|
||||||
/*close winsock */
|
|
||||||
WSACleanup();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef PHP_WIN32
|
#ifdef PHP_WIN32
|
||||||
php_win32_free_rng_lock();
|
php_win32_free_rng_lock();
|
||||||
#endif
|
#endif
|
||||||
|
@ -2400,6 +2400,11 @@ void php_module_shutdown(void)
|
||||||
|
|
||||||
zend_shutdown();
|
zend_shutdown();
|
||||||
|
|
||||||
|
#if defined(PHP_WIN32) || (defined(NETWARE) && defined(USE_WINSOCK))
|
||||||
|
/*close winsock */
|
||||||
|
WSACleanup();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Destroys filter & transport registries too */
|
/* Destroys filter & transport registries too */
|
||||||
php_shutdown_stream_wrappers(module_number);
|
php_shutdown_stream_wrappers(module_number);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue