vici: Refactor socket to clean up locking
authorMartin Willi <martin@revosec.ch>
Wed, 12 Feb 2014 16:55:38 +0000 (17:55 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 7 May 2014 12:13:36 +0000 (14:13 +0200)
commite567675d293e3a564c1d2756755d7356700fb00c
treea16dc68ffabb00bd3e8aed769db551968dad8150
parent9bfa397ebaca5ce2ce1414a6e60a36838b181d35
vici: Refactor socket to clean up locking

Uses separate locks for socket read and write operations. While holding the
socket reader lock, a different thread can still claim the socket write lock.
This allows to asynchronously send event messages while holding the read
lock.
src/libcharon/plugins/vici/vici_socket.c