projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f4d57e
)
Use send() when writing to sockets, and the return type is ssize_t.
author
Guus Sliepen
<guus@tinc-vpn.org>
Thu, 2 Jun 2011 22:34:30 +0000
(
00:34
+0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Thu, 2 Jun 2011 22:34:30 +0000
(
00:34
+0200)
src/net_socket.c
patch
|
blob
|
history
diff --git
a/src/net_socket.c
b/src/net_socket.c
index 80f37a455d53abfcd9efa77b0e73adafeedba2ff..d470fef5d9fab40bce12e5b90ffa92eba1293358 100644
(file)
--- a/
src/net_socket.c
+++ b/
src/net_socket.c
@@
-454,7
+454,7
@@
static void handle_meta_write(int sock, short events, void *data) {
connection_t *c = data;
- s
ize_t outlen = write(c->socket, c->outbuf.data + c->outbuf.offset, c->outbuf.len - c->outbuf.offset
);
+ s
size_t outlen = send(c->socket, c->outbuf.data + c->outbuf.offset, c->outbuf.len - c->outbuf.offset, 0
);
if(outlen <= 0) {
logger(LOG_ERR, "Onoes, outlen = %zd (%s)", outlen, strerror(errno));
terminate_connection(c, c->status.active);