[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: handle error properly, do n
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: handle error properly, do not just log but continue gracefully -- v6 also |
Date: |
Sat, 06 Jan 2018 21:37:29 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 328aade82 handle error properly, do not just log but continue
gracefully -- v6 also
328aade82 is described below
commit 328aade82c1f698ac7b93894a4bd659e14f41e4d
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Jan 6 21:37:27 2018 +0100
handle error properly, do not just log but continue gracefully -- v6 also
---
src/gns/gnunet-dns2gns.c | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c
index bf7cca042..2f0de030d 100644
--- a/src/gns/gnunet-dns2gns.c
+++ b/src/gns/gnunet-dns2gns.c
@@ -586,16 +586,26 @@ read_dns6 (void *cls)
}
{
char buf[size];
+ ssize_t sret;
addrlen = sizeof (v6);
- GNUNET_break (size ==
- GNUNET_NETWORK_socket_recvfrom (listen_socket6,
- buf,
- size,
- (struct sockaddr *) &v6,
- &addrlen));
- handle_request (listen_socket6, &v6, addrlen,
- buf, size);
+ sret = GNUNET_NETWORK_socket_recvfrom (listen_socket6,
+ buf,
+ size,
+ (struct sockaddr *) &v6,
+ &addrlen);
+ if (0 > sret)
+ {
+ GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING,
+ "recvfrom");
+ return;
+ }
+ GNUNET_break (size == (size_t) sret);
+ handle_request (listen_socket6,
+ &v6,
+ addrlen,
+ buf,
+ size);
}
}
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: handle error properly, do not just log but continue gracefully -- v6 also,
gnunet <=