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 2015/03/17 14:58:44 UTC
qpid-proton git commit: NO-JIRA: Restore data position when measuring
size of encoded data.
Repository: qpid-proton
Updated Branches:
refs/heads/master 94e924281 -> 973bad033
NO-JIRA: Restore data position when measuring size of encoded data.
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/973bad03
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/973bad03
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/973bad03
Branch: refs/heads/master
Commit: 973bad033ba3a1b700ab80ab4edee209ab81f05a
Parents: 94e9242
Author: Alan Conway <ac...@redhat.com>
Authored: Tue Mar 17 09:55:00 2015 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Tue Mar 17 09:56:46 2015 -0400
----------------------------------------------------------------------
proton-c/src/codec/encoder.c | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/973bad03/proton-c/src/codec/encoder.c
----------------------------------------------------------------------
diff --git a/proton-c/src/codec/encoder.c b/proton-c/src/codec/encoder.c
index f960655..1186952 100644
--- a/proton-c/src/codec/encoder.c
+++ b/proton-c/src/codec/encoder.c
@@ -369,7 +369,10 @@ ssize_t pn_encoder_size(pn_encoder_t *encoder, pn_data_t *src)
encoder->position = 0;
encoder->size = 0;
+ pn_handle_t save = pn_data_point(src);
int err = pni_data_traverse(src, pni_encoder_enter, pni_encoder_exit, encoder);
+ pn_data_restore(src, save);
+
if (err) return err;
return encoder->position - encoder->output;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org