diff options
author | Piotr Smolinski <piotr.smolinski@confluent.io> | 2019-08-20 13:36:19 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2019-08-20 13:10:53 +0000 |
commit | 6cf81c5633c8d04323f6cb9735c5710493ee6eee (patch) | |
tree | 175be6f37f8dd8b162e11832d834c5345cf44a29 | |
parent | d4ddf3d8bbd7531075d9d85e1839b63afb90dc01 (diff) |
Kafka: fix the name shadowing
Post-merge fix.
Change-Id: I712d275f90c5a1e425865654143ead7c3a04998b
Reviewed-on: https://code.wireshark.org/review/34332
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/dissectors/packet-kafka.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/epan/dissectors/packet-kafka.c b/epan/dissectors/packet-kafka.c index ccc90005d3..6fc5b37607 100644 --- a/epan/dissectors/packet-kafka.c +++ b/epan/dissectors/packet-kafka.c @@ -1850,16 +1850,20 @@ dissect_kafka_offset_time(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre kafka_api_version_t api_version _U_) { proto_item *ti; - gint64 time; + gint64 message_offset_time; - time = tvb_get_ntoh64(tvb, offset); + message_offset_time = tvb_get_ntoh64(tvb, offset); ti = proto_tree_add_item(tree, hf_kafka_offset_time, tvb, offset, 8, ENC_BIG_ENDIAN); offset += 8; - if (time == -1) { + // The query for offset at given time takes the time in milliseconds since epoch. + // It has two additional special values: + // * -1 - the latest offset (to consume new messages only) + // * -2 - the oldest offset (to consume all available messages) + if (message_offset_time == -1) { proto_item_append_text(ti, " (latest)"); - } else if (time == -2) { + } else if (message_offset_time == -2) { proto_item_append_text(ti, " (earliest)"); } |