summaryrefslogtreecommitdiff
path: root/main/network.c
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-03-17 22:50:59 +0000
committerWez Furlong <wez@php.net>2002-03-17 22:50:59 +0000
commitd2d8762267de33b954363189b4ec710e70527a2a (patch)
treeeb1a94dcc817decc20651b5999ccf3ea7699aadc /main/network.c
parent19e82a49f96393a7ae93331db73ef895f3c61376 (diff)
downloadphp-git-d2d8762267de33b954363189b4ec710e70527a2a.tar.gz
Streams now make more use of the memory manager, so tracking down
leaking streams should be easier. # I hate these big commits
Diffstat (limited to 'main/network.c')
-rw-r--r--main/network.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/main/network.c b/main/network.c
index eff1666344..3ae5861c74 100644
--- a/main/network.c
+++ b/main/network.c
@@ -413,7 +413,7 @@ int php_sockaddr_size(php_sockaddr_storage *addr)
}
/* }}} */
-PHPAPI php_stream *php_stream_sock_open_from_socket(int socket, int persistent)
+PHPAPI php_stream *_php_stream_sock_open_from_socket(int socket, int persistent STREAMS_DC)
{
php_stream *stream;
php_netstream_data_t *sock;
@@ -426,7 +426,7 @@ PHPAPI php_stream *php_stream_sock_open_from_socket(int socket, int persistent)
sock->timeout.tv_sec = -1;
sock->socket = socket;
- stream = php_stream_alloc(&php_stream_socket_ops, sock, persistent, "r+");
+ stream = php_stream_alloc_rel(&php_stream_socket_ops, sock, persistent, "r+");
if (stream == NULL)
pefree(sock, persistent);
@@ -434,8 +434,8 @@ PHPAPI php_stream *php_stream_sock_open_from_socket(int socket, int persistent)
return stream;
}
-PHPAPI php_stream *php_stream_sock_open_host(const char *host, unsigned short port,
- int socktype, int timeout, int persistent)
+PHPAPI php_stream *_php_stream_sock_open_host(const char *host, unsigned short port,
+ int socktype, int timeout, int persistent STREAMS_DC)
{
int socket;
@@ -444,10 +444,11 @@ PHPAPI php_stream *php_stream_sock_open_host(const char *host, unsigned short po
if (socket == -1)
return NULL;
- return php_stream_sock_open_from_socket(socket, persistent);
+ return php_stream_sock_open_from_socket_rel(socket, persistent);
}
-PHPAPI php_stream *php_stream_sock_open_unix(const char *path, int pathlen, int persistent, struct timeval *timeout)
+PHPAPI php_stream *_php_stream_sock_open_unix(const char *path, int pathlen, int persistent,
+ struct timeval *timeout STREAMS_DC)
{
#if defined(AF_UNIX)
int socketd;
@@ -476,7 +477,7 @@ PHPAPI php_stream *php_stream_sock_open_unix(const char *path, int pathlen, int
if (php_connect_nonb(socketd, (struct sockaddr *) &unix_addr, sizeof(unix_addr), timeout) == SOCK_CONN_ERR)
return NULL;
- return php_stream_sock_open_from_socket(socketd, persistent);
+ return php_stream_sock_open_from_socket_rel(socketd, persistent);
#else
return NULL;
#endif