You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2014/10/22 21:12:23 UTC

svn commit: r1633683 - in /qpid/proton/branches/examples/proton-c/src: dispatcher/dispatcher.c dispatcher/dispatcher.h transport/transport.c

Author: gsim
Date: Wed Oct 22 19:12:23 2014
New Revision: 1633683

URL: http://svn.apache.org/r1633683
Log:
PROTON-667: quick and dirty fix to allow state field to be sent along with transfer frame

Modified:
    qpid/proton/branches/examples/proton-c/src/dispatcher/dispatcher.c
    qpid/proton/branches/examples/proton-c/src/dispatcher/dispatcher.h
    qpid/proton/branches/examples/proton-c/src/transport/transport.c

Modified: qpid/proton/branches/examples/proton-c/src/dispatcher/dispatcher.c
URL: http://svn.apache.org/viewvc/qpid/proton/branches/examples/proton-c/src/dispatcher/dispatcher.c?rev=1633683&r1=1633682&r2=1633683&view=diff
==============================================================================
--- qpid/proton/branches/examples/proton-c/src/dispatcher/dispatcher.c (original)
+++ qpid/proton/branches/examples/proton-c/src/dispatcher/dispatcher.c Wed Oct 22 19:12:23 2014
@@ -291,7 +291,8 @@ int pn_post_transfer_frame(pn_dispatcher
                            uint32_t message_format,
                            bool settled,
                            bool more,
-                           pn_sequence_t frame_limit)
+                           pn_sequence_t frame_limit,
+                           uint64_t code, pn_data_t* state)
 {
   bool more_flag = more;
   int framecount = 0;
@@ -300,10 +301,10 @@ int pn_post_transfer_frame(pn_dispatcher
 
  compute_performatives:
   pn_data_clear(disp->output_args);
-  int err = pn_data_fill(disp->output_args, "DL[IIzIoo]", TRANSFER,
+  int err = pn_data_fill(disp->output_args, "DL[IIzIoon?DLC]", TRANSFER,
                          handle, id, tag->size, tag->start,
                          message_format,
-                         settled, more_flag);
+                         settled, more_flag, (bool)code, code, state);
   if (err) {
     pn_transport_logf(disp->transport,
                       "error posting transfer frame: %s: %s", pn_code(err),

Modified: qpid/proton/branches/examples/proton-c/src/dispatcher/dispatcher.h
URL: http://svn.apache.org/viewvc/qpid/proton/branches/examples/proton-c/src/dispatcher/dispatcher.h?rev=1633683&r1=1633682&r2=1633683&view=diff
==============================================================================
--- qpid/proton/branches/examples/proton-c/src/dispatcher/dispatcher.h (original)
+++ qpid/proton/branches/examples/proton-c/src/dispatcher/dispatcher.h Wed Oct 22 19:12:23 2014
@@ -72,5 +72,6 @@ int pn_post_transfer_frame(pn_dispatcher
                            uint32_t message_format,
                            bool settled,
                            bool more,
-                           pn_sequence_t frame_limit);
+                           pn_sequence_t frame_limit,
+                           uint64_t code, pn_data_t* state);
 #endif /* dispatcher.h */

Modified: qpid/proton/branches/examples/proton-c/src/transport/transport.c
URL: http://svn.apache.org/viewvc/qpid/proton/branches/examples/proton-c/src/transport/transport.c?rev=1633683&r1=1633682&r2=1633683&view=diff
==============================================================================
--- qpid/proton/branches/examples/proton-c/src/transport/transport.c (original)
+++ qpid/proton/branches/examples/proton-c/src/transport/transport.c Wed Oct 22 19:12:23 2014
@@ -1508,6 +1508,9 @@ int pn_process_tpwork_sender(pn_transpor
       pn_bytes_t bytes = pn_buffer_bytes(delivery->bytes);
       pn_set_payload(transport->disp, bytes.start, bytes.size);
       pn_bytes_t tag = pn_buffer_bytes(delivery->tag);
+      pn_data_clear(transport->disp_data);
+      pni_disposition_encode(&delivery->local, transport->disp_data);
+
       int count = pn_post_transfer_frame(transport->disp,
                                          ssn_state->local_channel,
                                          link_state->local_handle,
@@ -1515,7 +1518,8 @@ int pn_process_tpwork_sender(pn_transpor
                                          0, // message-format
                                          delivery->local.settled,
                                          !delivery->done,
-                                         ssn_state->remote_incoming_window);
+                                         ssn_state->remote_incoming_window,
+                                         delivery->local.type, transport->disp_data);
       if (count < 0) return count;
       xfr_posted = true;
       ssn_state->outgoing_transfer_count += count;



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