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 2014/07/22 22:26:53 UTC

svn commit: r1612694 - /qpid/dispatch/trunk/src/container.c

Author: tross
Date: Tue Jul 22 20:26:53 2014
New Revision: 1612694

URL: http://svn.apache.org/r1612694
Log:
NO-JIRA - Updated proton-engine event handling to match updates in Proton's trunk.
          Note that this will no longer compile against an older version of Proton.

Modified:
    qpid/dispatch/trunk/src/container.c

Modified: qpid/dispatch/trunk/src/container.c
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/src/container.c?rev=1612694&r1=1612693&r2=1612694&view=diff
==============================================================================
--- qpid/dispatch/trunk/src/container.c (original)
+++ qpid/dispatch/trunk/src/container.c Tue Jul 22 20:26:53 2014
@@ -295,30 +295,43 @@ static int process_handler(qd_container_
         event_count++;
 
         switch (pn_event_type(event)) {
-        case PN_CONNECTION_REMOTE_STATE :
+        case PN_CONNECTION_REMOTE_OPEN :
             if (pn_connection_state(conn) & PN_LOCAL_UNINIT)
                 pn_connection_open(conn);
-            else if (pn_connection_state(conn) == (PN_LOCAL_ACTIVE | PN_REMOTE_CLOSED))
+            break;
+
+        case PN_CONNECTION_REMOTE_CLOSE :
+            if (pn_connection_state(conn) == (PN_LOCAL_ACTIVE | PN_REMOTE_CLOSED))
                 pn_connection_close(conn);
             break;
 
-        case PN_SESSION_REMOTE_STATE :
+        case PN_SESSION_REMOTE_OPEN :
             ssn = pn_event_session(event);
             if (pn_session_state(ssn) & PN_LOCAL_UNINIT) {
                 pn_session_set_incoming_capacity(ssn, 1000000);
                 pn_session_open(ssn);
-            } else if (pn_session_state(ssn) == (PN_LOCAL_ACTIVE | PN_REMOTE_CLOSED))
+            }
+            break;
+
+        case PN_SESSION_REMOTE_CLOSE :
+            ssn = pn_event_session(event);
+            if (pn_session_state(ssn) == (PN_LOCAL_ACTIVE | PN_REMOTE_CLOSED))
                 pn_session_close(ssn);
             break;
 
-        case PN_LINK_REMOTE_STATE :
+        case PN_LINK_REMOTE_OPEN :
             pn_link = pn_event_link(event);
             if (pn_link_state(pn_link) & PN_LOCAL_UNINIT) {
                 if (pn_link_is_sender(pn_link))
                     setup_outgoing_link(container, pn_link);
                 else
                     setup_incoming_link(container, pn_link);
-            } else if (pn_link_state(pn_link) == (PN_LOCAL_ACTIVE | PN_REMOTE_CLOSED)) {
+            }
+            break;
+
+        case PN_LINK_REMOTE_CLOSE :
+            pn_link = pn_event_link(event);
+            if (pn_link_state(pn_link) == (PN_LOCAL_ACTIVE | PN_REMOTE_CLOSED)) {
                 qd_link_t *link = (qd_link_t*) pn_link_get_context(pn_link);
                 qd_node_t *node = link->node;
                 if (node)



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