diff options
author | Evan Huus <eapache@gmail.com> | 2015-04-05 21:24:40 -0400 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2015-04-06 17:17:56 +0000 |
commit | b23ab904e728022340f139701626a06851562b1d (patch) | |
tree | 7cebcab013731855f4e6a8ab1dd6c2ffef065479 /plugins | |
parent | 6efa0b63f28b1bc8247ad1b59c861501051e32ef (diff) |
unistim: remove tvb_length deprecated API
Change-Id: Ic2bdc6ec69dcdd856987ec74cc401cd8585727ac
Reviewed-on: https://code.wireshark.org/review/7937
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/unistim/packet-unistim.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/unistim/packet-unistim.c b/plugins/unistim/packet-unistim.c index ed8fdbf865..d634231f41 100644 --- a/plugins/unistim/packet-unistim.c +++ b/plugins/unistim/packet-unistim.c @@ -183,7 +183,6 @@ dissect_unistim(tvbuff_t *tvb,packet_info *pinfo,proto_tree *tree,void *data _U_ proto_item *ti= NULL; proto_tree *overall_unistim_tree = NULL; proto_tree *rudpm_tree=NULL; - gint size; /* heuristic*/ switch(tvb_get_guint8(tvb,offset+4)) {/*rudp packet type 0,1,2 only */ @@ -207,7 +206,6 @@ dissect_unistim(tvbuff_t *tvb,packet_info *pinfo,proto_tree *tree,void *data _U_ } - size=tvb_length_remaining(tvb, offset); col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNISTIM"); /* Clear out stuff in the info column */ col_clear(pinfo->cinfo, COL_INFO); @@ -265,7 +263,7 @@ dissect_unistim(tvbuff_t *tvb,packet_info *pinfo,proto_tree *tree,void *data _U_ /* Queue packet for tap */ tap_queue_packet(unistim_tap, pinfo, uinfo); - return size; + return tvb_captured_length(tvb); } static void @@ -316,7 +314,7 @@ dissect_payload(proto_tree *overall_unistim_tree,tvbuff_t *tvb, gint offset, pac /* Handle UFTP seperately because it is significantly different than standard UNISTIM */ - while (tvb_length_remaining(tvb, offset) > 0) + while (tvb_reported_length_remaining(tvb, offset) > 0) offset = dissect_unistim_message(unistim_tree,pinfo,tvb,offset); } @@ -353,7 +351,7 @@ dissect_uftp_message(proto_tree *unistim_tree,packet_info *pinfo _U_,tvbuff_t *t proto_tree_add_item(msg_tree,hf_uftp_datablock_limit,tvb,offset,1,ENC_BIG_ENDIAN); offset+=1; /* Get filename */ - str_len = tvb_length_remaining(tvb, offset); + str_len = tvb_reported_length_remaining(tvb, offset); proto_tree_add_item(msg_tree,hf_uftp_filename,tvb,offset,str_len,ENC_ASCII|ENC_NA); offset += str_len; break; @@ -376,7 +374,7 @@ dissect_uftp_message(proto_tree *unistim_tree,packet_info *pinfo _U_,tvbuff_t *t case 0x02: /* File Data Block */ /* Raw Data.. */ - dat_len = tvb_length_remaining(tvb, offset); + dat_len = tvb_reported_length_remaining(tvb, offset); proto_tree_add_item(msg_tree,hf_uftp_datablock,tvb,offset,dat_len,ENC_NA); offset += dat_len; break; @@ -407,7 +405,7 @@ dissect_unistim_message(proto_tree *unistim_tree,packet_info *pinfo,tvbuff_t *tv { ti=proto_tree_add_item(msg_tree,hf_unistim_len,tvb,offset,1,ENC_BIG_ENDIAN); expert_add_info(pinfo,ti,&ei_unistim_len); - return tvb_length(tvb); + return tvb_reported_length(tvb); } else { proto_item_set_len(ti,msg_len); proto_tree_add_item(msg_tree,hf_unistim_len,tvb,offset,1,ENC_BIG_ENDIAN); |