diff --git a/src/configuration.c b/src/configuration.c index e33fa99..c6ba209 100644 --- a/src/configuration.c +++ b/src/configuration.c @@ -1,4 +1,4 @@ -/* $Id: configuration.c,v 1.84 2009/05/11 20:51:25 stpohle Exp $ +/* $Id: configuration.c,v 1.85 2009/11/28 13:11:51 stpohle Exp $ * configuration */ #include @@ -591,6 +591,7 @@ config_video () {"640x480", NULL}, {"800x600", NULL}, {"1024x768", NULL}, + {"1280x800", NULL}, {"1280x1024", NULL}, {"1600x1200", NULL}, {"1920x1080", NULL}, diff --git a/src/udp.c b/src/udp.c index c2fbb78..1113970 100644 --- a/src/udp.c +++ b/src/udp.c @@ -1,4 +1,4 @@ -/* $Id: udp.c,v 1.16 2009/05/12 20:50:34 stpohle Exp $ */ +/* $Id: udp.c,v 1.17 2009/11/28 13:11:51 stpohle Exp $ */ /* udp.c code for the network File Version 0.2 */ @@ -285,12 +285,10 @@ udp_get (int sock, char *text, int len, struct _sockaddr *sAddr, int ai_family) FD_SET (sock, &sockset); tval.tv_sec = 0; - tval.tv_usec = 100; - + tval.tv_usec = 100; msglen = 0; - - if (select (sock + 1, &sockset, NULL, NULL, &tval)) { - msglen = recvfrom (sock, text, len, 0, (struct sockaddr *) sAddr, &clen); + if (select (sock + 1, &sockset, NULL, NULL, &tval)) if (FD_ISSET (sock, &sockset)) { + msglen = recvfrom (sock, text, len, MSG_DONTWAIT, (struct sockaddr *) sAddr, &clen); if (msglen < 0) return 0; @@ -306,12 +304,10 @@ dns_net_getip (char *host) { struct hostent *hAddr; - hAddr = gethostbyname (host); - + hAddr = gethostbyname (host); if (hAddr == NULL) return NULL; - strncpy (dnsip, inet_ntoa (*((struct in_addr *) hAddr->h_addr)), UDP_LEN_HOSTNAME); - return dnsip; + return dnsip; };