]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
vici: Signal waiting threads when removing a connection entry
authorTobias Brunner <tobias@strongswan.org>
Fri, 7 May 2021 08:53:57 +0000 (10:53 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 21 Jun 2021 07:59:15 +0000 (09:59 +0200)
If there are threads waiting in find_entry() and one in remove_entry()
and the latter is woken first by a thread calling put_entry(), the
former threads would remain stuck as they get never signaled.

src/libcharon/plugins/vici/vici_socket.c

index 36f8dcc78518f1b0f4c1904b75559fe3f1ea4560..babbc6d4bc5b8f731d0b6426b2cb7428fac5733e 100644 (file)
@@ -244,6 +244,7 @@ static entry_t* remove_entry(private_vici_socket_t *this, u_int id)
                                        break;
                                }
                                this->connections->remove_at(this->connections, enumerator);
+                               entry->cond->broadcast(entry->cond);
                                found = entry;
                                break;
                        }