aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-thrift.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2015-06-17 15:36:00 -0400
committerAnders Broman <a.broman58@gmail.com>2015-06-19 13:35:24 +0000
commit4d3abcc9cc0b95aa4428f6893a681a15eab1f643 (patch)
tree4cf273b6cc42de4518768cfdae99e8a766120363 /epan/dissectors/packet-thrift.c
parentaa8fcb30a5264867e7a0f61c1b41ce8693e091c0 (diff)
[thrift] fix a minor bug; Also: use col_clear()
Change-Id: I07dc57583f2e78b6b841a7adb5470e57fa314786 Reviewed-on: https://code.wireshark.org/review/8969 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-thrift.c')
-rw-r--r--epan/dissectors/packet-thrift.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/dissectors/packet-thrift.c b/epan/dissectors/packet-thrift.c
index 11d99edba5..27427b3b14 100644
--- a/epan/dissectors/packet-thrift.c
+++ b/epan/dissectors/packet-thrift.c
@@ -235,6 +235,9 @@ dissect_thrift_common(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree)
int length = tvb_reported_length(tvb);
guint8 type;
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "THRIFT");
+ col_clear(pinfo->cinfo, COL_INFO);
+
version = tvb_get_ntohs(tvb, 0);
mtype = tvb_get_guint8(tvb, 3);
str_len = tvb_get_ntohl(tvb, 4);
@@ -248,7 +251,6 @@ dissect_thrift_common(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree)
seq_id,
method_str);
- col_set_str(pinfo->cinfo, COL_PROTOCOL, "THRIFT");
col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s", val_to_str(mtype, thrift_mtype_vals, "%d"), method_str);
if (tree){
@@ -304,7 +306,7 @@ dissect_thrift_heur(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void *d
header = tvb_get_ntohl(tvb, offset);
- if ((header & THRIFT_VERSION_1) != THRIFT_VERSION_1){
+ if ((header & THRIFT_VERSION_MASK) != THRIFT_VERSION_1){
return FALSE;
}