BUGFIX : Windows version HTML Web browser support

Allow connection of a web browser to the Windows version via
http://127.0.0.1:8080
This commit is contained in:
Malcolm Robb 2014-05-09 23:44:11 +01:00
parent d200099244
commit a55b9a76b5
9 changed files with 8 additions and 7 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

1
dump1090.bat Normal file
View file

@ -0,0 +1 @@
dump1090.exe --interactive --net --net-ro-port 30002 --net-beast --mlat

View file

@ -51,7 +51,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"./dump1090.exe"
!ELSEIF "$(CFG)" == "dump1090 - Win32 Debug"

BIN
dump1090.exe Normal file

Binary file not shown.

View file

@ -37,7 +37,7 @@
// MinorVer changes when additional features are added, but not for bug fixes (range 00-99)
// DayDate & Year changes for all changes, including for bug fixes. It represent the release date of the update
//
#define MODES_DUMP1090_VERSION "1.08.2504.14"
#define MODES_DUMP1090_VERSION "1.08.0905.14"
// ============================= Include files ==========================

View file

@ -721,12 +721,7 @@ int handleHTTPRequest(struct client *c, char *p) {
if (stat(getFile, &sbuf) != -1 && (fd = open(getFile, O_RDONLY)) != -1) {
content = (char *) malloc(sbuf.st_size);
#ifndef _WIN32
if (read(fd, content, sbuf.st_size) == -1) {
#else
if (recv(fd, content, sbuf.st_size, 0) == -1) {
errno = WSAGetLastError();
#endif
snprintf(content, sbuf.st_size, "Error reading from file: %s", strerror(errno));
}
clen = sbuf.st_size;
@ -832,7 +827,11 @@ void modesReadFromClient(struct client *c, char *sep,
if (nread != left) {
bContinue = 0;
}
#ifndef _WIN32
if ( (nread < 0) && (errno != EAGAIN)) { // Error, or end of file
#else
if ( (nread < 0) && (errno != EWOULDBLOCK)) { // Error, or end of file
#endif
modesFreeClient(c);
}
if (nread <= 0) {

View file

@ -101,6 +101,7 @@ _inline int gettimeofday(struct timeval *tv, struct timezone *tz) {
#define STDIN_FILENO 0
#define EINPROGRESS WSAEINPROGRESS
#define EWOULDBLOCK WSAEWOULDBLOCK
#ifdef __cplusplus
}