forked from Imagelibrary/rtems
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:
@@ -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>
|
2006-02-08 Thomas Rauscher <trauscher@loytec.com>
|
||||||
|
|
||||||
PR 890/networking
|
PR 890/networking
|
||||||
|
|||||||
@@ -602,7 +602,7 @@ int socketReady(int sid)
|
|||||||
* noticed events. Timeout is in milliseconds.
|
* noticed events. Timeout is in milliseconds.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if WIN || CE
|
#if WIN || CE || __rtems__
|
||||||
|
|
||||||
int socketSelect(int sid, int timeout)
|
int socketSelect(int sid, int timeout)
|
||||||
{
|
{
|
||||||
@@ -610,12 +610,16 @@ int socketSelect(int sid, int timeout)
|
|||||||
socket_t *sp;
|
socket_t *sp;
|
||||||
fd_set readFds, writeFds, exceptFds;
|
fd_set readFds, writeFds, exceptFds;
|
||||||
int nEvents;
|
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(&readFds);
|
||||||
FD_ZERO(&writeFds);
|
FD_ZERO(&writeFds);
|
||||||
FD_ZERO(&exceptFds);
|
FD_ZERO(&exceptFds);
|
||||||
socketHighestFd = -1;
|
|
||||||
|
|
||||||
tv.tv_sec = timeout / 1000;
|
tv.tv_sec = timeout / 1000;
|
||||||
tv.tv_usec = (timeout % 1000) * 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
|
* Windows select() fails if no descriptors are set, instead of just sleeping
|
||||||
* like other, nice select() calls. So, if WIN, sleep.
|
* like other, nice select() calls. So, if WIN, sleep.
|
||||||
@@ -667,7 +672,8 @@ int socketSelect(int sid, int timeout)
|
|||||||
Sleep(timeout);
|
Sleep(timeout);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wait for the event or a timeout.
|
* Wait for the event or a timeout.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user