You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/03/01 20:54:55 UTC
[2/4] qpid-dispatch git commit: DISPATCH-309: Remove unused
QD_CONN_EVENT_ definitions.
DISPATCH-309: Remove unused QD_CONN_EVENT_ definitions.
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/454474e1
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/454474e1
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/454474e1
Branch: refs/heads/master
Commit: 454474e159d0c662b6c73d8de62a8d1a535aca33
Parents: 408dc10
Author: Alan Conway <ac...@redhat.com>
Authored: Fri Jan 20 17:14:57 2017 -0500
Committer: Alan Conway <ac...@redhat.com>
Committed: Wed Mar 1 13:59:59 2017 -0500
----------------------------------------------------------------------
include/qpid/dispatch/server.h | 9 ---------
src/container.c | 14 ++------------
src/server.c | 6 ------
3 files changed, 2 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/454474e1/include/qpid/dispatch/server.h
----------------------------------------------------------------------
diff --git a/include/qpid/dispatch/server.h b/include/qpid/dispatch/server.h
index 80e9c25..11dad05 100644
--- a/include/qpid/dispatch/server.h
+++ b/include/qpid/dispatch/server.h
@@ -187,15 +187,6 @@ typedef struct qd_connection_t qd_connection_t;
* Event type for the connection callback.
*/
typedef enum {
- /// The connection just opened via a listener (inbound).
- /// This event occurs when the AMQP OPEN is received from the client.
- /// The AMQP connection still needs to be locally opened
- QD_CONN_EVENT_LISTENER_OPEN,
-
- /// The connection just opened via a connector (outbound).
- /// The AMQP connection has been locally and remotely opened.
- QD_CONN_EVENT_CONNECTOR_OPEN,
-
/// The connection was closed at the transport level (not cleanly).
QD_CONN_EVENT_CLOSE,
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/454474e1/src/container.c
----------------------------------------------------------------------
diff --git a/src/container.c b/src/container.c
index e32e739..d6d9c78 100644
--- a/src/container.c
+++ b/src/container.c
@@ -245,6 +245,8 @@ static void notify_closed(qd_container_t *container, qd_connection_t *conn, void
// this particular list is only ever appended to and never has items inserted or deleted,
// this usage is safe in this case.
//
+ // This assumes that pointer assignment is atomic, which it is on most platforms.
+ //
sys_mutex_lock(container->lock);
qdc_node_type_t *nt_item = DEQ_HEAD(container->node_type_list);
sys_mutex_unlock(container->lock);
@@ -603,24 +605,12 @@ int pn_event_handler(void *handler_context, void *conn_context, pn_event_t *even
}
-static void open_handler(qd_container_t *container, qd_connection_t *conn, qd_direction_t dir, void *context)
-{
-}
-
-
static int handler(void *handler_context, void *conn_context, qd_conn_event_t event, qd_connection_t *qd_conn)
{
qd_container_t *container = (qd_container_t*) handler_context;
pn_connection_t *conn = qd_connection_pn(qd_conn);
switch (event) {
- case QD_CONN_EVENT_LISTENER_OPEN:
- open_handler(container, qd_conn, QD_INCOMING, conn_context);
- return 1;
-
- case QD_CONN_EVENT_CONNECTOR_OPEN:
- open_handler(container, qd_conn, QD_OUTGOING, conn_context);
- return 1;
case QD_CONN_EVENT_CLOSE:
return close_handler(container, conn_context, conn, qd_conn);
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/454474e1/src/server.c
----------------------------------------------------------------------
diff --git a/src/server.c b/src/server.c
index 84d0e28..658bb91 100644
--- a/src/server.c
+++ b/src/server.c
@@ -774,16 +774,10 @@ static int process_connector(qd_server_t *qd_server, qdpn_connector_t *cxtr)
//
if (!ctx->opened && pn_event_type(event) == PN_CONNECTION_REMOTE_OPEN) {
ctx->opened = true;
- qd_conn_event_t ce = QD_CONN_EVENT_LISTENER_OPEN;
-
if (ctx->connector) {
- ce = QD_CONN_EVENT_CONNECTOR_OPEN;
ctx->connector->delay = 2000; // Delay on re-connect in case there is a recurring error
} else
assert(ctx->listener);
-
- qd_server->conn_handler(qd_server->conn_handler_context,
- ctx->context, ce, (qd_connection_t*) qdpn_connector_context(cxtr));
events = 1;
} else if (pn_event_type(event) == PN_TRANSPORT_ERROR) {
if (ctx->connector) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org