summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Radke <tradke@aei.mpg.de>2002-03-11 15:32:37 (GMT)
committerThomas Radke <tradke@aei.mpg.de>2002-03-11 15:32:37 (GMT)
commitbbc50c3a1f3096959f09bce67e993267bda9df24 (patch)
tree715e6b83247ef316e14bbeb2289b3f436f61b73a /src
parent6eea626ef09a0f6948f4ddcbd3738239391155aa (diff)
downloadhdf5-bbc50c3a1f3096959f09bce67e993267bda9df24.zip
hdf5-bbc50c3a1f3096959f09bce67e993267bda9df24.tar.gz
hdf5-bbc50c3a1f3096959f09bce67e993267bda9df24.tar.bz2
[svn-r5060]
Purpose: Bugfix Description: Internally created socket wasn't closed Solution: In my last commit I only fixed the case for sending data over a socket. There was also a resource leak for the receiving side where an internally created socket wasn't closed. Same wrong logical condition, same fix. Platforms tested: Linux, SGI
Diffstat (limited to 'src')
-rw-r--r--src/H5FDstream.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5FDstream.c b/src/H5FDstream.c
index 919f360..ed7035e 100644
--- a/src/H5FDstream.c
+++ b/src/H5FDstream.c
@@ -519,7 +519,7 @@ H5FDstream_open_socket (const char *filename, int o_flags,
/* Return if opening the socket failed */
if (*errormsg)
{
- if (H5FD_STREAM_ERROR_CHECK (sock))
+ if (! H5FD_STREAM_ERROR_CHECK (sock))
{
H5FD_STREAM_CLOSE_SOCKET (sock);
sock = H5FD_STREAM_INVALID_SOCKET;
@@ -756,7 +756,7 @@ static H5FD_t *H5FD_stream_open (const char *filename,
the opened socket is not needed anymore */
if (errormsg == NULL)
{
- if (_stream.internal_socket && H5FD_STREAM_ERROR_CHECK (_stream.socket))
+ if (_stream.internal_socket && ! H5FD_STREAM_ERROR_CHECK (_stream.socket))
{
H5FD_STREAM_CLOSE_SOCKET (_stream.socket);
}
@@ -786,7 +786,7 @@ static H5FD_t *H5FD_stream_open (const char *filename,
{
H5MM_xfree (_stream.mem);
}
- if (_stream.internal_socket && H5FD_STREAM_ERROR_CHECK (_stream.socket))
+ if (_stream.internal_socket && ! H5FD_STREAM_ERROR_CHECK (_stream.socket))
{
H5FD_STREAM_CLOSE_SOCKET (_stream.socket);
}