You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2016/09/29 18:47:18 UTC
thrift git commit: THRIFT-3935 Incorrect skipping of map and set
Client: c_glib Patch: Matej Kupljen
Repository: thrift
Updated Branches:
refs/heads/master 8ccf5a645 -> e349c345d
THRIFT-3935 Incorrect skipping of map and set
Client: c_glib
Patch: Matej Kupljen <ma...@cloudmondo.com>
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/e349c345
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/e349c345
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/e349c345
Branch: refs/heads/master
Commit: e349c345d3c3380657f7d0d388cda676f2014c3d
Parents: 8ccf5a6
Author: Matej Kupljen <ma...@cloudmondo.com>
Authored: Thu Sep 29 20:46:26 2016 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Thu Sep 29 20:46:26 2016 +0200
----------------------------------------------------------------------
.../src/thrift/c_glib/protocol/thrift_protocol.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/e349c345/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c
----------------------------------------------------------------------
diff --git a/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c b/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c
index d6315d8..8a560a9 100644
--- a/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c
+++ b/lib/c_glib/src/thrift/c_glib/protocol/thrift_protocol.c
@@ -485,7 +485,7 @@ thrift_protocol_skip (ThriftProtocol *protocol, ThriftType type, GError **error)
result += thrift_protocol_read_struct_end (protocol, error);
return result;
}
- case T_MAP:
+ case T_SET:
{
guint32 result = 0;
ThriftType elem_type;
@@ -499,6 +499,22 @@ thrift_protocol_skip (ThriftProtocol *protocol, ThriftType type, GError **error)
result += thrift_protocol_read_set_end (protocol, error);
return result;
}
+ case T_MAP:
+ {
+ guint32 result = 0;
+ ThriftType elem_type;
+ ThriftType key_type;
+ guint32 i, size;
+ result += thrift_protocol_read_map_begin (protocol, &key_type, &elem_type, &size,
+ error);
+ for (i = 0; i < size; i++)
+ {
+ result += thrift_protocol_skip (protocol, key_type, error);
+ result += thrift_protocol_skip (protocol, elem_type, error);
+ }
+ result += thrift_protocol_read_map_end (protocol, error);
+ return result;
+ }
case T_LIST:
{
guint32 result = 0;