aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-04-07 10:54:17 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-04-07 10:54:17 +0000
commit351b7594ff60e537134ad16d3d6b6cb2b8bf4ced (patch)
tree774e875ab3de385f173969b0fd3d650a5d6cde0c
parentfdc358a520a006601e443ec6ef7234128f1d4b2e (diff)
downloadChibiOS-351b7594ff60e537134ad16d3d6b6cb2b8bf4ced.tar.gz
ChibiOS-351b7594ff60e537134ad16d3d6b6cb2b8bf4ced.tar.bz2
ChibiOS-351b7594ff60e537134ad16d3d6b6cb2b8bf4ced.zip
Fixed bug #398.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5563 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/platforms/Posix/serial_lld.c6
-rw-r--r--readme.txt1
2 files changed, 7 insertions, 0 deletions
diff --git a/os/hal/platforms/Posix/serial_lld.c b/os/hal/platforms/Posix/serial_lld.c
index 28cd19421..cfe6792ca 100644
--- a/os/hal/platforms/Posix/serial_lld.c
+++ b/os/hal/platforms/Posix/serial_lld.c
@@ -64,6 +64,9 @@ static u_long nb = 1;
static void init(SerialDriver *sdp, uint16_t port) {
struct sockaddr_in sad;
struct protoent *prtp;
+ int sockval = 1;
+ socklen_t socklen = sizeof(sockval);
+
if ((prtp = getprotobyname("tcp")) == NULL) {
printf("%s: Error mapping protocol name to protocol number\n", sdp->com_name);
@@ -76,6 +79,9 @@ static void init(SerialDriver *sdp, uint16_t port) {
goto abort;
}
+
+ setsockopt(sdp->com_listen, SOL_SOCKET, SO_REUSEADDR, &sockval, socklen);
+
if (ioctl(sdp->com_listen, FIONBIO, &nb) != 0) {
printf("%s: Unable to setup non blocking mode on socket\n", sdp->com_name);
goto abort;
diff --git a/readme.txt b/readme.txt
index 6af7fcc65..626419d25 100644
--- a/readme.txt
+++ b/readme.txt
@@ -89,6 +89,7 @@
*****************************************************************************
*** 2.5.2 ***
+- FIX: Fixed patch to allow simulator to be restarted quicker (bug #398).
- FIX: Fixed blkDisconnect macro typo (bug #397).
- FIX: Fixed STM32 SPI (V2) driver hangs (bug 3608241).
- FIX: Fixed fixed I2C malfunction after fixing bug 3607518 (bug 3607549)