2006-03-07 Paul Whitfield <paulw@omnitronics.com.au>

PR 843/rtems_misc
	* rtems_webserver/socket.c: There is a memory corruption problem in the
	selectSocket function in the web server, this only become apparent if
	you disable the built in memory allocation functions. I have disabled
	the internal memory management to get file upload working.
This commit is contained in:
Joel Sherrill
2006-03-07 21:37:35 +00:00
parent 5b78cd6bc9
commit 79eb6e21ca
2 changed files with 18 additions and 4 deletions

View File

@@ -1,3 +1,11 @@
2006-03-07 Paul Whitfield <paulw@omnitronics.com.au>
PR 843/rtems_misc
* rtems_webserver/socket.c: There is a memory corruption problem in the
selectSocket function in the web server, this only become apparent if
you disable the built in memory allocation functions. I have disabled
the internal memory management to get file upload working.
2006-02-08 Thomas Rauscher <trauscher@loytec.com>
PR 890/networking

View File

@@ -602,7 +602,7 @@ int socketReady(int sid)
* noticed events. Timeout is in milliseconds.
*/
#if WIN || CE
#if WIN || CE || __rtems__
int socketSelect(int sid, int timeout)
{
@@ -610,12 +610,16 @@ int socketSelect(int sid, int timeout)
socket_t *sp;
fd_set readFds, writeFds, exceptFds;
int nEvents;
int all, socketHighestFd; /* Highest socket fd opened */
int all;
#if WIN || CE
int socketHighestFd; /* Highest socket fd opened */
socketHighestFd = -1;
#endif
FD_ZERO(&readFds);
FD_ZERO(&writeFds);
FD_ZERO(&exceptFds);
socketHighestFd = -1;
tv.tv_sec = timeout / 1000;
tv.tv_usec = (timeout % 1000) * 1000;
@@ -659,6 +663,7 @@ int socketSelect(int sid, int timeout)
}
}
#if WIN || CE
/*
* Windows select() fails if no descriptors are set, instead of just sleeping
* like other, nice select() calls. So, if WIN, sleep.
@@ -667,7 +672,8 @@ int socketSelect(int sid, int timeout)
Sleep(timeout);
return 0;
}
#endif
/*
* Wait for the event or a timeout.
*/