From d20009924430a69723e00dd31c3bd0738a79e819 Mon Sep 17 00:00:00 2001 From: Malcolm Robb Date: Fri, 25 Apr 2014 17:00:58 +0100 Subject: [PATCH] BUGFIX : Possible linked list bug --- Release/dump1090.exe | Bin 110592 -> 110592 bytes Release/view1090.exe | Bin 90112 -> 90112 bytes anet.c | 11 ++++------- net_io.c | 7 ++++++- winstubs.h | 1 - 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Release/dump1090.exe b/Release/dump1090.exe index bb8a2a15654763402ccbcbd7cc9f8bf9105beba9..f7a9cd1727cf77060bca0beb6b074217812587a0 100644 GIT binary patch delta 1439 zcmZ|NZA@EL7zglkZd(Rg+=WsFrDnJyAdHoaDF}>PAsaX{n#~|1#u4LUw=e?>Qv^)9 zv}I)NW|Omhm~DA+zC{-y9=D<_h6z%f#%$3QGS=H{^1a;oU5WoPq)H!)3SxL!jjg`6iL}v4_id(msB$Tw8Ge zOrI>fZrR7Q_Eov{kvglfyn@UgW$xy44?fc$8xk?J-qDRx+!-EbyIZyh>w5XImdS+p z`c5T{6IJY`j^7g<9TIUv0~GW9ox^brv%?Fr>>O#`UFWKbcj--11#y{5E+5faJ?#>) zzTIXfkw;4si_nig+iU0>K|vzPC5fdcY z!!-!QqMv=?uhPYm5ivg%vZ0h4dQ_B7@{Hb-0`1|0{i|_?@7_X@`z100TErDl0}e># zU%#L61f66Vy}FM>B|D!~D9nOh zqtYyRQ!|x~aH9b{9AW|5WC&2 z?)B5r%#_IEPOtmhSO(T9= zp$**p(99cZ;m@0F^=3IfF68>JKO{7or4a-leH|dro@&bGcH(=X}M9xD5wyxqd zI0JU5J%5bu(Z#++;5QvjPG`+jykMfGYR#9u5}68^3+YCU;d)3S(;(wHeI4sTiPP{k z41uG?bf+rm6}_3XgVH~Zb}sN!Dc!6~TI!OBKEX`Zo}PfgLKinDyo&ylih#jJxtjhM Vxay$KQvKv@iTp>Ptc#B3`~%|EGI9U_ delta 1419 zcmZ{ie@s(X6vyv6jA{->d4k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&oFh>%uq!R0u9J2qi!?XHgMo`n{ zE3BN-VHTt{ubP;309sCY&BUYwX!(uZCgz~$puZ$2{n}};DB#cDX=3gJRP@Tt$sZAe z$n;=9DDL~aOmcc-{(l>8viSNIl6+$t`Oo!9o)tHq36Fn!J`S9ZP5q<7EMD+yxsQ3^ z1udJRDBq9&aM%i{1}p+30D6YxFvkFI1L^@hpcG&N7y*|ek!b+DfE|F1fR%tn03)DB zm&0@bT671-MY2bRK9{UzDmS?*Y^URs$*kRG!$^dmV5g4w+cs0^ni5x&A5>gJ0^IEHL7L(|`v9CjpNDHUcB5 zVf4T>ozekofYrcsSQWrZ;9m58IItf$0{9ZJ0k{WP4J-l=0`3Bi1nvN)uMHa^UObc)nuorj;@Lu4dz`KA)0`CBh2i^{hJ2|uUz>6iUz_Od48(YT4R2i?C=RPcBUkFACe+QOY*cI%7E-PzL{a=v}8Cd`T diff --git a/anet.c b/anet.c index 7552500..cbd7c6c 100644 --- a/anet.c +++ b/anet.c @@ -282,18 +282,15 @@ static int anetGenericAccept(char *err, int s, struct sockaddr *sa, socklen_t *l while(1) { fd = accept(s,sa,len); if (fd == -1) { -#ifdef _WIN32 - errno = WSAGetLastError(); -#endif - if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) { - #ifndef _WIN32 - } else if (errno == EINTR) { + if (errno == EINTR) { continue; +#else + errno = WSAGetLastError(); + if (errno == WSAEWOULDBLOCK) { #endif } else { anetSetError(err, "accept: %s", strerror(errno)); - return ANET_ERR; } } break; diff --git a/net_io.c b/net_io.c index add5956..98ce394 100644 --- a/net_io.c +++ b/net_io.c @@ -178,7 +178,9 @@ void modesSendAllClients(int service, void *msg, int len) { struct client *c = Modes.clients; while (c) { + // Read next before servicing client incase the service routine deletes the client! struct client *next = c->next; + if (c->service == service) { #ifndef _WIN32 int nwritten = write(c->fd, msg, len); @@ -921,6 +923,9 @@ void modesReadFromClients(void) { struct client *c = modesAcceptClients(); while (c) { + // Read next before servicing client incase the service routine deletes the client! + struct client *next = c->next; + if (c->service == Modes.ris) { modesReadFromClient(c,"\n",decodeHexMessage); } else if (c->service == Modes.bis) { @@ -928,7 +933,7 @@ void modesReadFromClients(void) { } else if (c->service == Modes.https) { modesReadFromClient(c,"\r\n\r\n",handleHTTPRequest); } - c = c->next; + c = next; } } // diff --git a/winstubs.h b/winstubs.h index f416668..5a6d575 100644 --- a/winstubs.h +++ b/winstubs.h @@ -101,7 +101,6 @@ _inline int gettimeofday(struct timeval *tv, struct timezone *tz) { #define STDIN_FILENO 0 #define EINPROGRESS WSAEINPROGRESS -#define EWOULDBLOCK WSAEWOULDBLOCK #ifdef __cplusplus }