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/10 14:56:57 UTC

svn commit: r1630853 - /qpid/proton/branches/examples/proton-c/src/message/message.c

Author: gsim
Date: Fri Oct 10 12:56:57 2014
New Revision: 1630853

URL: http://svn.apache.org/r1630853
Log:
PROTON-661: applied patch from miguel

Modified:
    qpid/proton/branches/examples/proton-c/src/message/message.c

Modified: qpid/proton/branches/examples/proton-c/src/message/message.c
URL: http://svn.apache.org/viewvc/qpid/proton/branches/examples/proton-c/src/message/message.c?rev=1630853&r1=1630852&r2=1630853&view=diff
==============================================================================
--- qpid/proton/branches/examples/proton-c/src/message/message.c (original)
+++ qpid/proton/branches/examples/proton-c/src/message/message.c Fri Oct 10 12:56:57 2014
@@ -975,6 +975,7 @@ int pn_message_save_data(pn_message_t *m
                                   pn_data_error(msg->body));
   if (scanned) {
     if (bytes.size > *size) {
+      *size = bytes.size;
       return PN_OVERFLOW;
     } else {
       memcpy(data, bytes.start, bytes.size);
@@ -997,6 +998,7 @@ int pn_message_save_text(pn_message_t *m
       {
         pn_bytes_t str = pn_data_get_bytes(msg->body);
         if (str.size >= *size) {
+          *size = str.size;
           return PN_OVERFLOW;
         } else {
           memcpy(data, str.start, str.size);



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