aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-couchbase.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-02-19 22:29:03 -0800
committerGuy Harris <guy@alum.mit.edu>2018-02-20 06:29:54 +0000
commit647e5b449a9af1b553698f2f62e70afd05850bf9 (patch)
tree796823cf7e4d3dd9074a018c426edba991828453 /epan/dissectors/packet-couchbase.c
parent0a8152c260b7939633e91202ae6f5c8075405f97 (diff)
Use units for the server recv->send duration.
We *do* support units for FT_FLOAT and FT_DOUBLE, so use them. Change-Id: I94dbce89c785109b2c6ef89243f5611963e63dc8 Reviewed-on: https://code.wireshark.org/review/25917 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-couchbase.c')
-rw-r--r--epan/dissectors/packet-couchbase.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/epan/dissectors/packet-couchbase.c b/epan/dissectors/packet-couchbase.c
index 78c5fd3fb1..5a3eef44fc 100644
--- a/epan/dissectors/packet-couchbase.c
+++ b/epan/dissectors/packet-couchbase.c
@@ -2109,14 +2109,12 @@ static void dissect_flexible_framing_extras(tvbuff_t* tvb,
if (id == FLEX_ID_RX_TX_DURATION) {
// Decode the u16 time value into a double
guint16 encoded_micros = tvb_get_ntohs(tvb, offset);
- double decoded_micros = pow(encoded_micros, 1.74) / 2;
- proto_tree_add_double_format(frame_tree,
- hf_flex_frame_tracing_duration,
- tvb,
- offset,
- 2,
- decoded_micros,
- "%g us", decoded_micros);
+ proto_tree_add_double(frame_tree,
+ hf_flex_frame_tracing_duration,
+ tvb,
+ offset,
+ 2,
+ pow(encoded_micros, 1.74) / 2);
} else {
expert_add_info_format(pinfo,
frame,
@@ -2364,7 +2362,7 @@ proto_register_couchbase(void)
{ &hf_flex_frame_id_esc, {"Flexible Frame ID (escaped)", "couchbase.flex_frame.frame.id", FT_UINT16, BASE_DEC, VALS(flex_frame_ids), 0xF0, NULL, HFILL } },
{ &hf_flex_frame_len, {"Flexible Frame Len", "couchbase.flex_frame.frame.len", FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL } },
{ &hf_flex_frame_len_esc, {"Flexible Frame Len (escaped)", "couchbase.flex_frame.frame.len", FT_UINT16, BASE_DEC, NULL, 0x0F, NULL, HFILL } },
- { &hf_flex_frame_tracing_duration, {"Server Recv->Send duration", "couchbase.flex_frame.frame.duration", FT_DOUBLE, BASE_NONE, NULL, 0, NULL, HFILL } },
+ { &hf_flex_frame_tracing_duration, {"Server Recv->Send duration", "couchbase.flex_frame.frame.duration", FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, &units_microseconds, 0, NULL, HFILL } },
{ &hf_extras, { "Extras", "couchbase.extras", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_extras_flags, { "Flags", "couchbase.extras.flags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },