Mercurial > hg > quicktun
changeset 59:2f4d333f7500
Fix SO_ERROR ouput type
According to POSIX, SO_ERROR expects an int, not a "long long", so use
that instead.
author | Andreas Rottmann <a.rottmann@gmx.at> |
---|---|
date | Sun, 26 Jun 2016 04:10:01 +0200 |
parents | 732d45ab94ab |
children | 81dfc3046d62 |
files | src/common.c |
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 Sun Jun 26 04:10:01 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;