Switch the floats in stat_tap table items to doubles.

Use doubles instead of floats in stat_tap_table_item_type. This should
make stat taps easier to use with a lot of our API (e.g. nstime) along
with Qt and the C math library.

This reverts commit 5bbb6ff5e4.

Change-Id: I113b44fb944a883cde016b7a8961597658be4c0a
Reviewed-on: https://code.wireshark.org/review/9912
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
This commit is contained in:
Gerald Combs 2015-08-07 08:39:09 -07:00
parent c90fcba042
commit 147ab19f08
2 changed files with 4 additions and 4 deletions

View File

@ -3850,7 +3850,7 @@ rpc_prog_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
const rpc_call_info_value *ri = (const rpc_call_info_value *)rciv_ptr;
int num_fields = sizeof(rpc_prog_stat_fields)/sizeof(stat_tap_table_item);
nstime_t delta;
gfloat delta_s = 0.0;
double delta_s = 0.0;
guint call_count;
guint element;
gboolean found = FALSE;
@ -3902,7 +3902,7 @@ rpc_prog_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
/* calculate time delta between request and reply */
nstime_delta(&delta, &pinfo->fd->abs_ts, &ri->req_time);
delta_s = (gfloat)nstime_to_sec(&delta);
delta_s = nstime_to_sec(&delta);
item_data = new_stat_tap_get_field_data(table, element, MIN_SRT_COLUMN);
if (item_data->value.float_value == 0.0 || delta_s < item_data->value.float_value) {

View File

@ -84,7 +84,7 @@ typedef struct _stat_tap_table_item_type
guint uint_value;
gint int_value;
const char* string_value;
gfloat float_value;
double float_value;
gint enum_value;
} value;
/* Scratch space for the dissector. Alternatively we could also add support
@ -94,7 +94,7 @@ typedef struct _stat_tap_table_item_type
guint uint_value;
gint int_value;
const char* string_value;
gfloat float_value;
double float_value;
gint enum_value;
void* ptr_value;
} user_data;