[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 03/10] Fix termination of threads in spd_close
From: |
Boris Dušek |
Subject: |
[PATCH 03/10] Fix termination of threads in spd_close |
Date: |
Mon, 23 Jul 2012 15:24:14 +0200 |
From: Boris Dus?ek <address@hidden>
To: address@hidden
---
src/api/c/libspeechd.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/api/c/libspeechd.c b/src/api/c/libspeechd.c
index 25e5250..2b26ba4 100644
--- a/src/api/c/libspeechd.c
+++ b/src/api/c/libspeechd.c
@@ -559,6 +559,9 @@ void spd_close(SPDConnection * connection)
pthread_mutex_lock(connection->ssip_mutex);
+ /* close the socket */
+ close(connection->socket);
+
if (connection->mode == SPD_MODE_THREADED) {
pthread_cancel(*connection->events_thread);
pthread_mutex_destroy(connection->mutex_reply_ready);
@@ -569,9 +572,6 @@ void spd_close(SPDConnection * connection)
connection->mode = SPD_MODE_SINGLE;
}
- /* close the socket */
- close(connection->socket);
-
pthread_mutex_unlock(connection->ssip_mutex);
pthread_mutex_destroy(connection->ssip_mutex);
--
1.7.7.5 (Apple Git-26)
- [PATCH 06/10] Use afplay and libao for playing sound on OS X in dummy, (continued)
- [PATCH 06/10] Use afplay and libao for playing sound on OS X in dummy, Boris Dušek, 2012/07/23
- [PATCH 07/10] Abstract unnamed semaphore interface and add OS X implementation, Boris Dušek, 2012/07/23
- [PATCH 08/10] Use launchd on OS X for launching the server, Boris Dušek, 2012/07/23
- [PATCH 09/10] Installation instructions for OS X, Boris Dušek, 2012/07/23
- [PATCH 10/10] Native SSM output module for OS X, Boris Dušek, 2012/07/23
- [PATCH 01/10] Remove references to TEMP_FAILURE_RETRY, Boris Dušek, 2012/07/23
- [PATCH 02/10] Do not exit on localization init fail, Boris Dušek, 2012/07/23
- [PATCH 03/10] Fix termination of threads in spd_close,
Boris Dušek <=
- [PATCH 04/10] Cleanup execution of commands in dummy, Boris Dušek, 2012/07/23
- [PATCH 05/10] Fix audio module dynamic opening on OS X, Boris Dušek, 2012/07/23
- [PATCH 06/10] Use afplay and libao for playing sound on OS X in dummy, Boris Dušek, 2012/07/23
- [PATCH 07/10] Abstract unnamed semaphore interface and add OS X implementation, Boris Dušek, 2012/07/23
- [PATCH 08/10] Use launchd on OS X for launching the server, Boris Dušek, 2012/07/23
- [PATCH 09/10] Installation instructions for OS X, Boris Dušek, 2012/07/23
- [PATCH 10/10] Native SSM output module for OS X, Boris Dušek, 2012/07/23