changeset 60:81dfc3046d62

Merge pull request #13 from rotty/so-error Fix SO_ERROR ouput type
author Ivo Smits <Ivo@UCIS.nl>
date Mon, 04 Jul 2016 11:59:12 +0200
parents 732d45ab94ab (current diff) 2f4d333f7500 (diff)
children 66d9d80215f0
files
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/common.c	Sat Feb 01 00:02:00 2014 +0100
+++ b/src/common.c	Mon Jul 04 11:59:12 2016 +0200
@@ -373,10 +373,10 @@
 				len = recvfrom(sfd, buffer_enc + p->offset_enc, p->buffersize_enc, 0, (struct sockaddr*)&recvaddr, &recvaddr_len);
 			}
 			if (len < 0) {
-				long long out;
+				int out;
 				socklen_t slen = sizeof(out);
 				getsockopt(sfd, SOL_SOCKET, SO_ERROR, &out, &slen);
-				fprintf(stderr, "Received end of file on udp socket (error %lld)\n", out);
+				fprintf(stderr, "Received end of file on udp socket (error %d)\n", out);
 			} else {
 				len = p->decode(&session, buffer_enc, buffer_raw + pi_length, len);
 				if (len < 0) continue;