You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2015/09/08 23:28:47 UTC
[3/3] qpid-dispatch git commit: DISPATCH-167 - Protect against the
thread-safety issue described in PROTON-989.
DISPATCH-167 - Protect against the thread-safety issue described in PROTON-989.
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/b03635a7
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/b03635a7
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/b03635a7
Branch: refs/heads/master
Commit: b03635a75aa66e2b6773bef0cdbc768125ce0281
Parents: 0ed628f
Author: Ted Ross <tr...@redhat.com>
Authored: Tue Sep 8 17:27:48 2015 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Tue Sep 8 17:27:48 2015 -0400
----------------------------------------------------------------------
src/server.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/b03635a7/src/server.c
----------------------------------------------------------------------
diff --git a/src/server.c b/src/server.c
index 71871aa..b46fb72 100644
--- a/src/server.c
+++ b/src/server.c
@@ -213,7 +213,7 @@ static void add_connection_properties(pn_connection_t *conn)
}
-static void thread_process_listeners(qd_server_t *qd_server)
+static void thread_process_listeners_LH(qd_server_t *qd_server)
{
qdpn_driver_t *driver = qd_server->driver;
qdpn_listener_t *listener;
@@ -626,7 +626,7 @@ static void *thread_run(void *arg)
//
// Process listeners (incoming connections).
//
- thread_process_listeners(qd_server);
+ thread_process_listeners_LH(qd_server);
//
// Traverse the list of connectors-needing-service from the proton driver.
@@ -903,10 +903,12 @@ static void cxtr_try_open(void *context)
//
// Set up SASL
//
+ sys_mutex_lock(ct->server->lock);
pn_sasl_t *sasl = pn_sasl(tport);
if (config->sasl_mechanisms)
pn_sasl_allowed_mechs(sasl, config->sasl_mechanisms);
pn_sasl_set_allow_insecure_mechs(sasl, config->allowInsecureAuthentication);
+ sys_mutex_unlock(ct->server->lock);
ctx->owner_thread = CONTEXT_NO_OWNER;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org