From 99d82c4980878211b75a00130c208fc0d816a981 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Tue, 5 May 2009 17:20:45 +0000 Subject: [PATCH] Fixed bug #26405: Prematurely released semaphore causes lwip_select() to crash --- CHANGELOG | 4 ++++ src/api/sockets.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 58b8a885..3eadb446 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -95,6 +95,10 @@ HISTORY ++ Bugfixes: + 2009-05-05 Simon Goldschmidt + * sockets.c: bug #26405: Prematurely released semaphore causes lwip_select() + to crash + 2009-05-04 Simon Goldschmidt * init.c: snmp was not initialized in lwip_init() diff --git a/src/api/sockets.c b/src/api/sockets.c index 44faa1b7..1711ea18 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -1101,8 +1101,8 @@ event_callback(struct netconn *conn, enum netconn_evt evt, u16_t len) } if (scb) { scb->sem_signalled = 1; - sys_sem_signal(selectsem); sys_sem_signal(scb->sem); + sys_sem_signal(selectsem); } else { sys_sem_signal(selectsem); break;