diff options
Diffstat (limited to 'epan/dissectors/packet-omron-fins.c')
-rw-r--r-- | epan/dissectors/packet-omron-fins.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-omron-fins.c b/epan/dissectors/packet-omron-fins.c index 3519df28ed..28518363eb 100644 --- a/epan/dissectors/packet-omron-fins.c +++ b/epan/dissectors/packet-omron-fins.c @@ -1103,7 +1103,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da guint16 command_code; /* Make sure we have enough actual data to do the heuristics checks */ - if(tvb_length(tvb) < 12 ) { + if(tvb_captured_length(tvb) < 12 ) { return 0; } /* Check some bytes to see if it's OMRON */ @@ -1195,7 +1195,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da if (cmd_str_idx == -1) { /* Unknown command-code */ expert_add_info(pinfo, ti, &ei_omron_command_code); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Handle special cases wherein the data length for a command and/or a response can be 0 */ @@ -1215,7 +1215,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da if (reported_length_remaining != 0) { expert_add_info_format(pinfo, omron_tree, &ei_omron_bad_length, "Unexpected Length (Should be 0)"); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } break; @@ -1231,14 +1231,14 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da { expert_add_info_format(pinfo, ti, &ei_omron_command_code, "Unknown Response Command-Code"); } - return tvb_length(tvb); + return tvb_captured_length(tvb); break; case 0x0801: /* command data length = 0 or > 0 is OK; */ if (is_command) { if (reported_length_remaining == 0) - return tvb_length(tvb); + return tvb_captured_length(tvb); } break; @@ -1246,13 +1246,13 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da /* command data length = 0 or > 0 is OK; */ if (is_command) { if (reported_length_remaining == 0) - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* There's no response */ if (is_response) { expert_add_info_format(pinfo, ti, &ei_omron_command_code, "Unknown Response Command-Code"); - return tvb_length(tvb); + return tvb_captured_length(tvb); } break; @@ -1482,7 +1482,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da if(memory_code_len == 0) { expert_add_info_format(pinfo, ti, &ei_oomron_command_memory_area_code, "Unknown Memory-Area-Code (%u)", memory_area_code); - return tvb_length(tvb); /* Bail out .... */ + return tvb_captured_length(tvb); /* Bail out .... */ } proto_tree_add_item(command_tree, hf_omron_data, tvb, offset, memory_code_len, ENC_NA); offset = offset + memory_code_len; @@ -3242,7 +3242,7 @@ dissect_omron_fins(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da } /* if(tree) */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } void |