diff --git a/dump1090.c b/dump1090.c index 94c791d..7cadecc 100644 --- a/dump1090.c +++ b/dump1090.c @@ -867,7 +867,13 @@ int main(int argc, char **argv) { } else { if (Modes.filename[0] == '-' && Modes.filename[1] == '\0') { Modes.fd = STDIN_FILENO; - } else if ((Modes.fd = open(Modes.filename,O_RDONLY)) == -1) { + } else if ((Modes.fd = open(Modes.filename, +#ifdef _WIN32 + (O_RDONLY | O_BINARY) +#else + (O_RDONLY) +#endif + )) == -1) { perror("Opening data file"); exit(1); } diff --git a/net_io.c b/net_io.c index 2b0ed9a..4afeb23 100644 --- a/net_io.c +++ b/net_io.c @@ -88,7 +88,7 @@ void modesInitNet(void) { int s = anetTcpServer(Modes.aneterr, services[j].port, NULL); if (s == -1) { fprintf(stderr, "Error opening the listening port %d (%s): %s\n", - services[j].port, services[j].descr, strerror(errno)); + services[j].port, services[j].descr, Modes.aneterr); exit(1); } anetNonBlock(Modes.aneterr, s); @@ -851,11 +851,12 @@ void modesReadFromClient(struct client *c, char *sep, bContinue = 0; } #ifndef _WIN32 - if ( (nread < 0) && (errno != EAGAIN)) { // Error, or end of file + if ( (nread < 0 && errno != EAGAIN && errno != EWOULDBLOCK) || nread == 0 ) { // Error, or end of file #else if ( (nread < 0) && (errno != EWOULDBLOCK)) { // Error, or end of file #endif modesFreeClient(c); + return; } if (nread <= 0) { break; // Serve next client diff --git a/public_html/gmap.html b/public_html/gmap.html index 80afe02..96f412a 100644 --- a/public_html/gmap.html +++ b/public_html/gmap.html @@ -3,7 +3,7 @@ - + diff --git a/public_html/script.js b/public_html/script.js index 05d29b7..ed2a4dc 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -135,8 +135,12 @@ function initialize() { center: new google.maps.LatLng(CenterLat, CenterLon), zoom: ZoomLvl, mapTypeId: google.maps.MapTypeId.ROADMAP, + mapTypeControl: true, + streetViewControl: false, mapTypeControlOptions: { - mapTypeIds: mapTypeIds + mapTypeIds: mapTypeIds, + position: google.maps.ControlPosition.TOP_LEFT, + style: google.maps.MapTypeControlStyle.DROPDOWN_MENU } }; @@ -304,7 +308,7 @@ function refreshSelected() { html += '