noticed some incorrect error handling for some socket specific API's on windows
| From: | Sriram Natarajan | Date: | Wed, 02 Sep 2009 10:16:42 +0000 |
| Subject: | noticed some incorrect error handling for some socket specific API's on windows | ||
| Groups: | php.internals.win | ||
| Request: | Send a blank email to internals-win+get-595@lists.php.net to get a copy of this message | ||
HI
On Windows , socket API's does not return '-1' on failure. In this
case, most commonly returned error code is either SOCKET_ERROR or
INVALID_SOCKET. Af course, most of us know this. However, I did notice
that within our php implementation in some places we do check for the
same BSD style error value (< 0) rather than using the appropriate
macros. Here is a suggested patch to address this. Here, the issue is -
if we didn't catch the error at the right place, we might end up
providing incorrect error message(s). Please let me know, if I
overlooked some thing obvious here.
thanks
sriram