projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
128c91f
)
backup errno
author
Christian Grothoff
<christian@grothoff.org>
Sun, 4 Oct 2009 12:46:43 +0000
(12:46 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Sun, 4 Oct 2009 12:46:43 +0000
(12:46 +0000)
src/util/network.c
patch
|
blob
|
history
diff --git
a/src/util/network.c
b/src/util/network.c
index a3033d3b04d221c829340c3e157d2979a61a1f6e..2e1d40c80a746fc0481c4141e43833efaa128ce8 100644
(file)
--- a/
src/util/network.c
+++ b/
src/util/network.c
@@
-148,14
+148,17
@@
int
GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc)
\r
{
\r
int ret;
\r
+ int eno;
\r
+
\r
#ifdef MINGW
\r
ret = closesocket (desc->fd);
\r
- SetErrnoFromWinsockError (WSAGetLastError ());
\r
+ SetErrnoFromWinsockError (WSAGetLastError ());
\r
#else
\r
ret = close (desc->fd);
\r
#endif
\r
-
\r
+ eno = errno;
\r
GNUNET_free (desc);
\r
+ errno = eno;
\r
return ret == 0 ? GNUNET_OK : GNUNET_SYSERR;
\r
}
\r
\r