Mercurial > hg > quicktun
comparison src/common.c @ 4:a989ecbd5f53
Fixed nacltai implementation
author | ivo <ivo@UFO-Net.nl> |
---|---|
date | Fri, 08 Oct 2010 18:18:05 +0200 |
parents | 27632fe319bd |
children | cf9b44b46be5 |
comparison
equal
deleted
inserted
replaced
3:27632fe319bd | 4:a989ecbd5f53 |
---|---|
217 getsockopt(sfd, SOL_SOCKET, SO_ERROR, &out, &len); | 217 getsockopt(sfd, SOL_SOCKET, SO_ERROR, &out, &len); |
218 fprintf(stderr, "End of file on udp socket"); | 218 fprintf(stderr, "End of file on udp socket"); |
219 } else { | 219 } else { |
220 len = p->decode(&session, buffer_enc, buffer_raw, len); | 220 len = p->decode(&session, buffer_enc, buffer_raw, len); |
221 if (len != 0 && session.remote_float != 0 && (session.remote_addr.sin_addr.s_addr != recvaddr.sin_addr.s_addr || session.remote_addr.sin_port != recvaddr.sin_port)) { | 221 if (len != 0 && session.remote_float != 0 && (session.remote_addr.sin_addr.s_addr != recvaddr.sin_addr.s_addr || session.remote_addr.sin_port != recvaddr.sin_port)) { |
222 //fprintf(stderr, "Remote endpoint has changed to %s:%d", inet_ntoa(recvaddr.sin_addr), ntohs(recvaddr.sin_port)); | 222 fprintf(stderr, "Remote endpoint has changed to %08X:%d\n", recvaddr.sin_addr, ntohs(recvaddr.sin_port)); |
223 fprintf(stderr, "Remote endpoint has changed to %s:%d", 0, 0); | |
224 session.remote_addr = recvaddr; | 223 session.remote_addr = recvaddr; |
225 session.remote_float = 2; | 224 session.remote_float = 2; |
226 } | 225 } |
227 if (len < 0) return len; | 226 if (len < 0) return len; |
228 write(ttfd, buffer_raw + p->offset_raw, len); | 227 write(ttfd, buffer_raw + p->offset_raw, len); |