qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject [2/4] qpid-proton git commit: PROTON-730: allow transactional state to be read on incoming transfers
Date Wed, 07 Jan 2015 21:00:28 GMT
PROTON-730: allow transactional state to be read on incoming transfers


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/1e96dae8
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/1e96dae8
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/1e96dae8

Branch: refs/heads/master
Commit: 1e96dae8039e560b9de09d3c97343d301667fb22
Parents: a439ee2
Author: Gordon Sim <gsim@apache.org>
Authored: Mon Oct 27 15:25:52 2014 +0000
Committer: Gordon Sim <gsim@redhat.com>
Committed: Wed Jan 7 20:23:57 2015 +0000

----------------------------------------------------------------------
 proton-c/src/transport/transport.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1e96dae8/proton-c/src/transport/transport.c
----------------------------------------------------------------------
diff --git a/proton-c/src/transport/transport.c b/proton-c/src/transport/transport.c
index a434b48..6220329 100644
--- a/proton-c/src/transport/transport.c
+++ b/proton-c/src/transport/transport.c
@@ -1181,8 +1181,11 @@ int pn_do_transfer(pn_transport_t *transport, uint8_t frame_type, uint16_t
chann
   pn_sequence_t id;
   bool settled;
   bool more;
-  int err = pn_data_scan(args, "D.[I?Iz.oo]", &handle, &id_present, &id, &tag,
-                         &settled, &more);
+  bool has_type;
+  uint64_t type;
+  pn_data_clear(transport->disp_data);
+  int err = pn_data_scan(args, "D.[I?Iz.oo.D?LC]", &handle, &id_present, &id,
&tag,
+                         &settled, &more, &has_type, &type, transport->disp_data);
   if (err) return err;
   pn_session_t *ssn = pn_channel_state(transport, channel);
 
@@ -1212,6 +1215,10 @@ int pn_do_transfer(pn_transport_t *transport, uint8_t frame_type, uint16_t
chann
                          "sequencing error, expected delivery-id %u, got %u",
                          state->id, id);
     }
+    if (has_type) {
+      delivery->remote.type = type;
+      pn_data_copy(delivery->remote.data, transport->disp_data);
+    }
 
     link->state.delivery_count++;
     link->state.link_credit--;


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


Mime
View raw message