cvs: php4 /ext/sockets sockets.c
| From: | Harald Radi | Date: | Sat, 15 Jun 2002 15:58:20 +0000 |
| Subject: | cvs: php4 /ext/sockets sockets.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12369@lists.php.net to get a copy of this message | ||
phanto Sat Jun 15 11:58:20 2002 EDT
Modified files:
/php4/ext/sockets sockets.c
Log:
workaround for a win32 memleak
# this definitely has to be revisited !
# maybe we should use winsock2 and overlapped IO
Index: php4/ext/sockets/sockets.c
diff -u php4/ext/sockets/sockets.c:1.114 php4/ext/sockets/sockets.c:1.115
--- php4/ext/sockets/sockets.c:1.114 Sun May 12 03:22:47 2002
+++ php4/ext/sockets/sockets.c Sat Jun 15 11:58:16 2002
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sockets.c,v 1.114 2002/05/12 07:22:47 jason Exp $ */
+/* $Id: sockets.c,v 1.115 2002/06/15 15:58:16 phanto Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -56,7 +56,6 @@
# define set_errno(a) (errno = a)
# define set_h_errno(a) (h_errno = a)
#else /* windows */
-# include <winsock.h>
# include "php_sockets.h"
# include "php_sockets_win.h"
# define IS_INVALID_SOCKET(a) (a->bsd_socket == INVALID_SOCKET)
@@ -755,6 +754,8 @@
retval = (*read_function)(php_sock->bsd_socket, tmpbuf, length);
#else
retval = recv(php_sock->bsd_socket, tmpbuf, length, 0);
+ /* i don't know why, but it _does_ fix a memleak */
+ SleepEx(1, TRUE);
#endif
if (retval == -1) {