summaryrefslogtreecommitdiff
path: root/socket/tcp-bsd.c
diff options
context:
space:
mode:
authorYouness Alaoui <youness.alaoui@collabora.co.uk>2014-04-05 00:21:02 -0400
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>2014-05-15 09:38:52 -0400
commit935d15d0674cd47c4efb16cc835cb9c66d4cbae5 (patch)
treeba537c548093c601ed0b5e52ea024babded8f5f2 /socket/tcp-bsd.c
parent39a65a1da83e0861e63d8dbc98fd916f3bc3eef4 (diff)
downloadlibnice-935d15d0674cd47c4efb16cc835cb9c66d4cbae5.tar.gz
Return number of sent messages in socket_send_messages when an error happens part-way
Diffstat (limited to 'socket/tcp-bsd.c')
-rw-r--r--socket/tcp-bsd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/socket/tcp-bsd.c b/socket/tcp-bsd.c
index 6e3f2e4..620c796 100644
--- a/socket/tcp-bsd.c
+++ b/socket/tcp-bsd.c
@@ -342,6 +342,8 @@ socket_send_messages (NiceSocket *sock, const NiceAddress *to,
if (len < 0) {
/* Error. */
+ if (i > 0)
+ break;
return len;
} else if (len == 0) {
/* EWOULDBLOCK. */