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/02/19 22:36:38 UTC

svn commit: r1661010 - in /qpid/dispatch/trunk/src: server.c server_private.h

Author: tross
Date: Thu Feb 19 21:36:38 2015
New Revision: 1661010

URL: http://svn.apache.org/r1661010
Log:
DISPATCH-117 - Close window for race condition on failing SSL (and non-SSL) connections.

Modified:
    qpid/dispatch/trunk/src/server.c
    qpid/dispatch/trunk/src/server_private.h

Modified: qpid/dispatch/trunk/src/server.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/server.c?rev=1661010&r1=1661009&r2=1661010&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/server.c (original)
+++ qpid/dispatch/trunk/src/server.c Thu Feb 19 21:36:38 2015
@@ -128,7 +128,7 @@ static void thread_process_listeners(qd_
         ctx = new_qd_connection_t();
         DEQ_ITEM_INIT(ctx);
         ctx->state        = CONN_STATE_OPENING;
-        ctx->owner_thread = CONTEXT_NO_OWNER;
+        ctx->owner_thread = CONTEXT_UNSPECIFIED_OWNER;
         ctx->enqueued     = 0;
         ctx->pn_cxtr      = cxtr;
         ctx->collector    = 0;
@@ -233,6 +233,7 @@ static void thread_process_listeners(qd_
         pn_sasl_done(sasl, PN_SASL_OK);  // TODO - This needs to go away
 
         qdpn_connector_set_context(cxtr, ctx);
+        ctx->owner_thread = CONTEXT_NO_OWNER;
     }
 }
 
@@ -719,7 +720,7 @@ static void cxtr_try_open(void *context)
     DEQ_ITEM_INIT(ctx);
     ctx->server       = ct->server;
     ctx->state        = CONN_STATE_CONNECTING;
-    ctx->owner_thread = CONTEXT_NO_OWNER;
+    ctx->owner_thread = CONTEXT_UNSPECIFIED_OWNER;
     ctx->enqueued     = 0;
     ctx->pn_conn      = 0;
     ctx->collector    = 0;
@@ -815,6 +816,7 @@ static void cxtr_try_open(void *context)
     pn_sasl_t *sasl = pn_sasl(tport);
     pn_sasl_mechanisms(sasl, config->sasl_mechanisms);
     pn_sasl_client(sasl);
+    ctx->owner_thread = CONTEXT_NO_OWNER;
 }
 
 

Modified: qpid/dispatch/trunk/src/server_private.h
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/server_private.h?rev=1661010&r1=1661009&r2=1661010&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/server_private.h (original)
+++ qpid/dispatch/trunk/src/server_private.h Thu Feb 19 21:36:38 2015
@@ -46,6 +46,7 @@ typedef enum {
 ENUM_DECLARE(conn_state);
 
 #define CONTEXT_NO_OWNER -1
+#define CONTEXT_UNSPECIFIED_OWNER -2
 
 typedef enum {
     CXTR_STATE_CONNECTING = 0,



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org