There's no "old" stat_tap_table, so remove "new_" from the name.

Change-Id: I1a0349d5d9d47210a97ff7a99fb358e59fd70e72
Reviewed-on: https://code.wireshark.org/review/12896
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2015-12-28 16:18:12 -08:00
parent affa8011a2
commit 0c156fec93
20 changed files with 117 additions and 117 deletions

View File

@ -4462,7 +4462,7 @@ static stat_tap_table_item stat_fields[] = {{TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "
static void ansi_map_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
int num_fields = sizeof(stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* table = new_stat_tap_init_table("ANSI MAP Operation Statistics", num_fields, 0, "ansi_map.op_code", gui_callback, gui_data);
stat_tap_table* table = new_stat_tap_init_table("ANSI MAP Operation Statistics", num_fields, 0, "ansi_map.op_code", gui_callback, gui_data);
int i = 0;
stat_tap_table_item_type items[sizeof(stat_fields)/sizeof(stat_tap_table_item)];
@ -4493,7 +4493,7 @@ ansi_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
{
new_stat_data_t* stat_data = (new_stat_data_t*)tapdata;
const ansi_map_tap_rec_t *data_p = (const ansi_map_tap_rec_t *)data;
new_stat_tap_table* table;
stat_tap_table* table;
stat_tap_table_item_type* item_data;
guint i = 0, count, total_bytes;
@ -4501,7 +4501,7 @@ ansi_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
if (try_val_to_str(data_p->message_type, ansi_map_opr_code_strings) == NULL)
return FALSE;
table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, i);
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
item_data = new_stat_tap_get_field_data(table, data_p->message_type, COUNT_COLUMN);
item_data->value.uint_value++;
@ -4521,7 +4521,7 @@ ansi_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
}
static void
ansi_map_stat_reset(new_stat_tap_table* table)
ansi_map_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;

View File

@ -1223,7 +1223,7 @@ static stat_tap_table_item camel_stat_fields[] = {{TABLE_ITEM_STRING, TAP_ALIGN_
static void camel_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
int num_fields = sizeof(camel_stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* table = new_stat_tap_init_table("CAMEL Message Counters", num_fields, 0, NULL, gui_callback, gui_data);
stat_tap_table* table = new_stat_tap_init_table("CAMEL Message Counters", num_fields, 0, NULL, gui_callback, gui_data);
int i;
stat_tap_table_item_type items[sizeof(camel_stat_fields)/sizeof(stat_tap_table_item)];
@ -1254,11 +1254,11 @@ camel_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_
{
new_stat_data_t* stat_data = (new_stat_data_t*)tapdata;
const struct camelsrt_info_t *csi = (const struct camelsrt_info_t *) csi_ptr;
new_stat_tap_table* table;
stat_tap_table* table;
stat_tap_table_item_type* msg_data;
guint i = 0;
table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, i);
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
if (csi->opcode >= table->num_elements)
return FALSE;
msg_data = new_stat_tap_get_field_data(table, csi->opcode, COUNT_COLUMN);
@ -1269,7 +1269,7 @@ camel_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_
}
static void
camel_stat_reset(new_stat_tap_table* table)
camel_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;
@ -1283,7 +1283,7 @@ camel_stat_reset(new_stat_tap_table* table)
}
static void
camel_stat_free_table_item(new_stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
camel_stat_free_table_item(stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
{
if (column != MESSAGE_TYPE_COLUMN) return;
g_free((char*)field_data->value.string_value);

View File

@ -2488,7 +2488,7 @@ static stat_tap_table_item gsm_map_stat_fields[] = {
static void gsm_map_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
int num_fields = sizeof(gsm_map_stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* table;
stat_tap_table* table;
guint i;
stat_tap_table_item_type items[sizeof(gsm_map_stat_fields)/sizeof(stat_tap_table_item)];
@ -2530,12 +2530,12 @@ gsm_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _
{
new_stat_data_t* stat_data = (new_stat_data_t*)tapdata;
const gsm_map_tap_rec_t *gmtr = (const gsm_map_tap_rec_t *)gmtr_ptr;
new_stat_tap_table* table;
stat_tap_table* table;
stat_tap_table_item_type *invoke_data, *fwd_bytes_data, *result_data, *rev_bytes_data, *avg_data;
guint invokes, fwd_bytes, results, rev_bytes;
guint i = 0;
table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, i);
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
invoke_data = new_stat_tap_get_field_data(table, gmtr->opcode, INVOKES_COLUMN);
fwd_bytes_data = new_stat_tap_get_field_data(table, gmtr->opcode, NUM_BYTES_FWD_COLUMN);
@ -2584,7 +2584,7 @@ gsm_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _
}
static void
gsm_map_stat_reset(new_stat_tap_table* table)
gsm_map_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;
@ -2598,7 +2598,7 @@ gsm_map_stat_reset(new_stat_tap_table* table)
}
static void
gsm_map_stat_free_table_item(new_stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
gsm_map_stat_free_table_item(stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
{
if (column != OP_CODE_COLUMN) return;
g_free((char*)field_data->value.string_value);

View File

@ -485,7 +485,7 @@ static guint other_idx;
static void h225_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
int num_fields = sizeof(h225_stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* table = new_stat_tap_init_table("H.225 Messages and Message Reasons", num_fields, 0, NULL, gui_callback, gui_data);
stat_tap_table* table = new_stat_tap_init_table("H.225 Messages and Message Reasons", num_fields, 0, NULL, gui_callback, gui_data);
int row_idx = 0, msg_idx;
stat_tap_table_item_type items[sizeof(h225_stat_fields)/sizeof(stat_tap_table_item)];
@ -789,7 +789,7 @@ h225_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
}
if (tag_idx >= 0) {
new_stat_tap_table*table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, 0);
stat_tap_table*table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, 0);
stat_tap_table_item_type* msg_data = new_stat_tap_get_field_data(table, tag_idx, COUNT_COLUMN);;
msg_data->value.uint_value++;
new_stat_tap_set_field_data(table, tag_idx, COUNT_COLUMN, msg_data);
@ -806,7 +806,7 @@ h225_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
}
static void
h225_stat_reset(new_stat_tap_table* table)
h225_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;

View File

@ -10593,7 +10593,7 @@ static stat_tap_table_item dtap_stat_fields[] = {{TABLE_ITEM_UINT, TAP_ALIGN_RIG
static void ansi_a_dtap_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
int num_fields = sizeof(dtap_stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* table = new_stat_tap_init_table("ANSI A-I/F DTAP Statistics", num_fields, 0, NULL, gui_callback, gui_data);
stat_tap_table* table = new_stat_tap_init_table("ANSI A-I/F DTAP Statistics", num_fields, 0, NULL, gui_callback, gui_data);
int i = 0;
stat_tap_table_item_type items[sizeof(dtap_stat_fields)/sizeof(stat_tap_table_item)];
@ -10620,7 +10620,7 @@ ansi_a_dtap_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *e
new_stat_data_t* stat_data = (new_stat_data_t*)tapdata;
const ansi_a_tap_rec_t *data_p = (const ansi_a_tap_rec_t *)data;
stat_tap_table_item_type* dtap_data;
new_stat_tap_table* table;
stat_tap_table* table;
guint i = 0, idx;
if (data_p->pdu_type == BSSAP_PDU_TYPE_DTAP)
@ -10628,7 +10628,7 @@ ansi_a_dtap_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *e
if (my_try_val_to_str_idx(data_p->message_type, ansi_a_dtap_strings, &idx) == NULL)
return FALSE;
table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, i);
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
dtap_data = new_stat_tap_get_field_data(table, data_p->message_type, COUNT_COLUMN);
dtap_data->value.uint_value++;
@ -10641,7 +10641,7 @@ ansi_a_dtap_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *e
}
static void
ansi_a_stat_reset(new_stat_tap_table* table)
ansi_a_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;
@ -10661,7 +10661,7 @@ static stat_tap_table_item bsmap_stat_fields[] = {{TABLE_ITEM_UINT, TAP_ALIGN_RI
static void ansi_a_bsmap_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
int num_fields = sizeof(bsmap_stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* table = new_stat_tap_init_table("ANSI A-I/F BSMAP Statistics", num_fields, 0, NULL, gui_callback, gui_data);
stat_tap_table* table = new_stat_tap_init_table("ANSI A-I/F BSMAP Statistics", num_fields, 0, NULL, gui_callback, gui_data);
int i = 0;
stat_tap_table_item_type items[sizeof(bsmap_stat_fields)/sizeof(stat_tap_table_item)];
@ -10688,7 +10688,7 @@ ansi_a_bsmap_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *
new_stat_data_t* stat_data = (new_stat_data_t*)tapdata;
const ansi_a_tap_rec_t *data_p = (const ansi_a_tap_rec_t *)data;
stat_tap_table_item_type* dtap_data;
new_stat_tap_table* table;
stat_tap_table* table;
guint i = 0, idx;
if (data_p->pdu_type == BSSAP_PDU_TYPE_BSMAP)
@ -10696,7 +10696,7 @@ ansi_a_bsmap_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *
if (my_try_val_to_str_idx(data_p->message_type, ansi_a_bsmap_strings, &idx) == NULL)
return FALSE;
table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, i);
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
dtap_data = new_stat_tap_get_field_data(table, data_p->message_type, COUNT_COLUMN);
dtap_data->value.uint_value++;

View File

@ -16111,7 +16111,7 @@ static stat_tap_table_item stat_fields[] = {{TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "
static void ansi_map_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
int num_fields = sizeof(stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* table = new_stat_tap_init_table("ANSI MAP Operation Statistics", num_fields, 0, "ansi_map.op_code", gui_callback, gui_data);
stat_tap_table* table = new_stat_tap_init_table("ANSI MAP Operation Statistics", num_fields, 0, "ansi_map.op_code", gui_callback, gui_data);
int i = 0;
stat_tap_table_item_type items[sizeof(stat_fields)/sizeof(stat_tap_table_item)];
@ -16142,7 +16142,7 @@ ansi_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
{
new_stat_data_t* stat_data = (new_stat_data_t*)tapdata;
const ansi_map_tap_rec_t *data_p = (const ansi_map_tap_rec_t *)data;
new_stat_tap_table* table;
stat_tap_table* table;
stat_tap_table_item_type* item_data;
guint i = 0, count, total_bytes;
@ -16150,7 +16150,7 @@ ansi_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
if (try_val_to_str(data_p->message_type, ansi_map_opr_code_strings) == NULL)
return FALSE;
table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, i);
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
item_data = new_stat_tap_get_field_data(table, data_p->message_type, COUNT_COLUMN);
item_data->value.uint_value++;
@ -16170,7 +16170,7 @@ ansi_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
}
static void
ansi_map_stat_reset(new_stat_tap_table* table)
ansi_map_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;

View File

@ -5620,7 +5620,7 @@ static stat_tap_table_item bootp_stat_fields[] = {{TABLE_ITEM_STRING, TAP_ALIGN_
static void bootp_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
int num_fields = sizeof(bootp_stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* table = new_stat_tap_init_table("DHCP Statistics", num_fields, 0, NULL, gui_callback, gui_data);
stat_tap_table* table = new_stat_tap_init_table("DHCP Statistics", num_fields, 0, NULL, gui_callback, gui_data);
int i = 0;
stat_tap_table_item_type items[sizeof(bootp_stat_fields)/sizeof(stat_tap_table_item)];
@ -5644,7 +5644,7 @@ bootp_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_
{
new_stat_data_t* stat_data = (new_stat_data_t*)tapdata;
const char* value = (const char*)data;
new_stat_tap_table* table;
stat_tap_table* table;
stat_tap_table_item_type* msg_data;
guint i = 0;
gint idx;
@ -5653,7 +5653,7 @@ bootp_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_
if (idx < 0)
return FALSE;
table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, i);
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
msg_data = new_stat_tap_get_field_data(table, idx, PACKET_COLUMN);
msg_data->value.uint_value++;
new_stat_tap_set_field_data(table, idx, PACKET_COLUMN, msg_data);
@ -5662,7 +5662,7 @@ bootp_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_
}
static void
bootp_stat_reset(new_stat_tap_table* table)
bootp_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;

View File

@ -8184,7 +8184,7 @@ static stat_tap_table_item camel_stat_fields[] = {{TABLE_ITEM_STRING, TAP_ALIGN_
static void camel_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
int num_fields = sizeof(camel_stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* table = new_stat_tap_init_table("CAMEL Message Counters", num_fields, 0, NULL, gui_callback, gui_data);
stat_tap_table* table = new_stat_tap_init_table("CAMEL Message Counters", num_fields, 0, NULL, gui_callback, gui_data);
int i;
stat_tap_table_item_type items[sizeof(camel_stat_fields)/sizeof(stat_tap_table_item)];
@ -8215,11 +8215,11 @@ camel_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_
{
new_stat_data_t* stat_data = (new_stat_data_t*)tapdata;
const struct camelsrt_info_t *csi = (const struct camelsrt_info_t *) csi_ptr;
new_stat_tap_table* table;
stat_tap_table* table;
stat_tap_table_item_type* msg_data;
guint i = 0;
table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, i);
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
if (csi->opcode >= table->num_elements)
return FALSE;
msg_data = new_stat_tap_get_field_data(table, csi->opcode, COUNT_COLUMN);
@ -8230,7 +8230,7 @@ camel_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_
}
static void
camel_stat_reset(new_stat_tap_table* table)
camel_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;
@ -8244,7 +8244,7 @@ camel_stat_reset(new_stat_tap_table* table)
}
static void
camel_stat_free_table_item(new_stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
camel_stat_free_table_item(stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
{
if (column != MESSAGE_TYPE_COLUMN) return;
g_free((char*)field_data->value.string_value);

View File

@ -3531,7 +3531,7 @@ static stat_tap_table_item gsm_a_stat_fields[] = {
static void gsm_a_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data, const char *table_title, const value_string *msg_strings)
{
int num_fields = sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* table;
stat_tap_table* table;
guint i;
stat_tap_table_item_type items[sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item)];
@ -3625,7 +3625,7 @@ gsm_a_stat_packet(void *tapdata, const void *gatr_ptr, guint8 pdu_type, int prot
{
new_stat_data_t* stat_data = (new_stat_data_t*)tapdata;
const gsm_a_tap_rec_t *gatr = (const gsm_a_tap_rec_t *) gatr_ptr;
new_stat_tap_table* table;
stat_tap_table* table;
stat_tap_table_item_type* msg_data;
guint i = 0;
@ -3633,7 +3633,7 @@ gsm_a_stat_packet(void *tapdata, const void *gatr_ptr, guint8 pdu_type, int prot
if (pdu_type == BSSAP_PDU_TYPE_DTAP && (int)gatr->protocol_disc != protocol_disc) return FALSE;
if (pdu_type == GSM_A_PDU_TYPE_SACCH && gatr->protocol_disc != 0) return FALSE;
table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, i);
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
msg_data = new_stat_tap_get_field_data(table, gatr->message_type, COUNT_COLUMN);
msg_data->value.uint_value++;
new_stat_tap_set_field_data(table, gatr->message_type, COUNT_COLUMN, msg_data);
@ -3702,7 +3702,7 @@ gsm_a_sacch_rr_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t
}
static void
gsm_a_stat_reset(new_stat_tap_table* table)
gsm_a_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;
@ -3716,7 +3716,7 @@ gsm_a_stat_reset(new_stat_tap_table* table)
}
static void
gsm_a_stat_free_table_item(new_stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
gsm_a_stat_free_table_item(stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
{
if (column != MSG_NAME_COLUMN) return;
g_free((char*)field_data->value.string_value);

View File

@ -22499,7 +22499,7 @@ static stat_tap_table_item gsm_map_stat_fields[] = {
static void gsm_map_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
int num_fields = sizeof(gsm_map_stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* table;
stat_tap_table* table;
guint i;
stat_tap_table_item_type items[sizeof(gsm_map_stat_fields)/sizeof(stat_tap_table_item)];
@ -22541,12 +22541,12 @@ gsm_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _
{
new_stat_data_t* stat_data = (new_stat_data_t*)tapdata;
const gsm_map_tap_rec_t *gmtr = (const gsm_map_tap_rec_t *)gmtr_ptr;
new_stat_tap_table* table;
stat_tap_table* table;
stat_tap_table_item_type *invoke_data, *fwd_bytes_data, *result_data, *rev_bytes_data, *avg_data;
guint invokes, fwd_bytes, results, rev_bytes;
guint i = 0;
table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, i);
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, i);
invoke_data = new_stat_tap_get_field_data(table, gmtr->opcode, INVOKES_COLUMN);
fwd_bytes_data = new_stat_tap_get_field_data(table, gmtr->opcode, NUM_BYTES_FWD_COLUMN);
@ -22595,7 +22595,7 @@ gsm_map_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _
}
static void
gsm_map_stat_reset(new_stat_tap_table* table)
gsm_map_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;
@ -22609,7 +22609,7 @@ gsm_map_stat_reset(new_stat_tap_table* table)
}
static void
gsm_map_stat_free_table_item(new_stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
gsm_map_stat_free_table_item(stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
{
if (column != OP_CODE_COLUMN) return;
g_free((char*)field_data->value.string_value);

View File

@ -7903,7 +7903,7 @@ static guint other_idx;
static void h225_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
int num_fields = sizeof(h225_stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* table = new_stat_tap_init_table("H.225 Messages and Message Reasons", num_fields, 0, NULL, gui_callback, gui_data);
stat_tap_table* table = new_stat_tap_init_table("H.225 Messages and Message Reasons", num_fields, 0, NULL, gui_callback, gui_data);
int row_idx = 0, msg_idx;
stat_tap_table_item_type items[sizeof(h225_stat_fields)/sizeof(stat_tap_table_item)];
@ -8207,7 +8207,7 @@ h225_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
}
if (tag_idx >= 0) {
new_stat_tap_table*table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, 0);
stat_tap_table*table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, 0);
stat_tap_table_item_type* msg_data = new_stat_tap_get_field_data(table, tag_idx, COUNT_COLUMN);;
msg_data->value.uint_value++;
new_stat_tap_set_field_data(table, tag_idx, COUNT_COLUMN, msg_data);
@ -8224,7 +8224,7 @@ h225_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
}
static void
h225_stat_reset(new_stat_tap_table* table)
h225_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;

View File

@ -794,7 +794,7 @@ static stat_tap_table_item mtp3_stat_fields[] = {
static void mtp3_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
int num_fields = sizeof(mtp3_stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* table;
stat_tap_table* table;
table = new_stat_tap_init_table("MTP3 Statistics", num_fields, 0, NULL, gui_callback, gui_data);
new_stat_tap_add_table(new_stat, table);
@ -807,7 +807,7 @@ mtp3_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
const mtp3_tap_rec_t *m3tr = (const mtp3_tap_rec_t *)m3tr_ptr;
gboolean found = FALSE;
guint element;
new_stat_tap_table* table;
stat_tap_table* table;
stat_tap_table_item_type* item_data;
guint msu_count;
guint byte_count;
@ -825,7 +825,7 @@ mtp3_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
/*
* look for opc/dpc pair
*/
table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, 0);
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, 0);
for (element = 0; element < table->num_elements; element++)
{
stat_tap_table_item_type *opc_data, *dpc_data, *si_data;
@ -912,7 +912,7 @@ mtp3_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
}
static void
mtp3_stat_reset(new_stat_tap_table* table)
mtp3_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;
@ -930,7 +930,7 @@ mtp3_stat_reset(new_stat_tap_table* table)
}
static void
mtp3_stat_free_table_item(new_stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
mtp3_stat_free_table_item(stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
{
switch(column) {
case OPC_COLUMN:

View File

@ -3854,7 +3854,7 @@ static stat_tap_table_item rpc_prog_stat_fields[] = {
static void rpc_prog_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
int num_fields = sizeof(rpc_prog_stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* table;
stat_tap_table* table;
table = new_stat_tap_init_table("ONC-RPC Program Statistics", num_fields, 0, NULL, gui_callback, gui_data);
new_stat_tap_add_table(new_stat, table);
@ -3872,10 +3872,10 @@ rpc_prog_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
guint call_count;
guint element;
gboolean found = FALSE;
new_stat_tap_table* table;
stat_tap_table* table;
stat_tap_table_item_type* item_data;
table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, 0);
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, 0);
for (element = 0; element < table->num_elements; element++)
{
@ -3943,7 +3943,7 @@ rpc_prog_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt
}
static void
rpc_prog_stat_reset(new_stat_tap_table* table)
rpc_prog_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;
@ -3966,7 +3966,7 @@ rpc_prog_stat_reset(new_stat_tap_table* table)
}
static void
rpc_prog_stat_free_table_item(new_stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
rpc_prog_stat_free_table_item(stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
{
if (column != PROGRAM_NAME_COLUMN) return;
g_free((char*)field_data->value.string_value);

View File

@ -4839,8 +4839,8 @@ static void sip_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gu
{
/* XXX Should we have a single request + response table instead? */
int num_fields = sizeof(sip_stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table *req_table = new_stat_tap_init_table("SIP Requests", num_fields, 0, NULL, gui_callback, gui_data);
new_stat_tap_table *resp_table = new_stat_tap_init_table("SIP Responses", num_fields, 0, NULL, gui_callback, gui_data);
stat_tap_table *req_table = new_stat_tap_init_table("SIP Requests", num_fields, 0, NULL, gui_callback, gui_data);
stat_tap_table *resp_table = new_stat_tap_init_table("SIP Responses", num_fields, 0, NULL, gui_callback, gui_data);
stat_tap_table_item_type items[sizeof(sip_stat_fields)/sizeof(stat_tap_table_item)];
guint i;
@ -4878,12 +4878,12 @@ sip_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
{
new_stat_data_t* stat_data = (new_stat_data_t*) tapdata;
const sip_info_value_t *info_value = (const sip_info_value_t *) siv_ptr;
new_stat_tap_table *cur_table = NULL;
stat_tap_table *cur_table = NULL;
guint cur_row = 0; /* 0 = Unknown for both tables */
if (info_value->request_method && info_value->response_code < 1) {
/* Request table */
new_stat_tap_table *req_table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, 0);
stat_tap_table *req_table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, 0);
stat_tap_table_item_type *item_data;
guint element;
@ -4898,7 +4898,7 @@ sip_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
} else if (info_value->response_code > 0) {
/* Response table */
new_stat_tap_table *resp_table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, 1);
stat_tap_table *resp_table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, 1);
guint response_code = info_value->response_code;
stat_tap_table_item_type *item_data;
guint element;
@ -4970,7 +4970,7 @@ sip_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
}
static void
sip_stat_reset(new_stat_tap_table* table)
sip_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;
@ -5006,7 +5006,7 @@ sip_stat_reset(new_stat_tap_table* table)
}
static void
sip_stat_free_table_item(new_stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
sip_stat_free_table_item(stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
{
if (column != REQ_RESP_METHOD_COLUMN) return;
g_free((char*)field_data->value.string_value);

View File

@ -5564,9 +5564,9 @@ static int unknown_sc_idx;
static void wsp_stat_init(new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
int num_fields = sizeof(wsp_stat_fields)/sizeof(stat_tap_table_item);
new_stat_tap_table* pt_table = new_stat_tap_init_table("PDU Types", num_fields, 0, NULL, gui_callback, gui_data);
stat_tap_table* pt_table = new_stat_tap_init_table("PDU Types", num_fields, 0, NULL, gui_callback, gui_data);
stat_tap_table_item_type pt_items[sizeof(wsp_stat_fields)/sizeof(stat_tap_table_item)];
new_stat_tap_table* sc_table = new_stat_tap_init_table("Status Codes", num_fields, 0, NULL, gui_callback, gui_data);
stat_tap_table* sc_table = new_stat_tap_init_table("Status Codes", num_fields, 0, NULL, gui_callback, gui_data);
stat_tap_table_item_type sc_items[sizeof(wsp_stat_fields)/sizeof(stat_tap_table_item)];
int table_idx;
@ -5614,13 +5614,13 @@ wsp_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
{
new_stat_data_t* stat_data = (new_stat_data_t*)tapdata;
const wsp_info_value_t *value = (const wsp_info_value_t *)wiv_ptr;
new_stat_tap_table *pt_table, *sc_table;
stat_tap_table *pt_table, *sc_table;
guint element;
stat_tap_table_item_type* item_data;
gboolean found;
pt_table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, 0);
sc_table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, 1);
pt_table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, 0);
sc_table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, 1);
found = FALSE;
for (element = 0; element < pt_table->num_elements; element++) {
@ -5658,7 +5658,7 @@ wsp_stat_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_,
}
static void
wsp_stat_reset(new_stat_tap_table* table)
wsp_stat_reset(stat_tap_table* table)
{
guint element;
stat_tap_table_item_type* item_data;
@ -5672,7 +5672,7 @@ wsp_stat_reset(new_stat_tap_table* table)
}
static void
wsp_stat_free_table_item(new_stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
wsp_stat_free_table_item(stat_tap_table* table _U_, guint row _U_, guint column, stat_tap_table_item_type* field_data)
{
if (column != MESSAGE_TYPE_COLUMN) return;
g_free((char*)field_data->value.string_value);

View File

@ -167,10 +167,10 @@ void new_stat_tap_get_filter(new_stat_tap_ui* new_stat, const char *opt_arg, con
new_stat->new_stat_filter_check_cb(opt_arg, filter, err);
}
new_stat_tap_table* new_stat_tap_init_table(const char *name, int num_fields, int num_elements,
stat_tap_table* new_stat_tap_init_table(const char *name, int num_fields, int num_elements,
const char *filter_string, new_stat_tap_gui_init_cb gui_callback, void* gui_data)
{
new_stat_tap_table* new_table = g_new0(new_stat_tap_table, 1);
stat_tap_table* new_table = g_new0(stat_tap_table, 1);
new_table->title = name;
new_table->num_elements = num_elements;
@ -184,15 +184,15 @@ new_stat_tap_table* new_stat_tap_init_table(const char *name, int num_fields, in
return new_table;
}
void new_stat_tap_add_table(new_stat_tap_ui* new_stat, new_stat_tap_table* table)
void new_stat_tap_add_table(new_stat_tap_ui* new_stat, stat_tap_table* table)
{
if (new_stat->tables == NULL)
new_stat->tables = g_array_new(FALSE, TRUE, sizeof(new_stat_tap_table*));
new_stat->tables = g_array_new(FALSE, TRUE, sizeof(stat_tap_table*));
g_array_insert_val(new_stat->tables, new_stat->tables->len, table);
}
void new_stat_tap_init_table_row(new_stat_tap_table *stat_table, guint table_index, guint num_fields, const stat_tap_table_item_type* fields)
void new_stat_tap_init_table_row(stat_tap_table *stat_table, guint table_index, guint num_fields, const stat_tap_table_item_type* fields)
{
/* we have discovered a new procedure. Extend the table accordingly */
if(table_index>=stat_table->num_elements){
@ -209,7 +209,7 @@ void new_stat_tap_init_table_row(new_stat_tap_table *stat_table, guint table_ind
}
stat_tap_table_item_type* new_stat_tap_get_field_data(const new_stat_tap_table *stat_table, guint table_index, guint field_index)
stat_tap_table_item_type* new_stat_tap_get_field_data(const stat_tap_table *stat_table, guint table_index, guint field_index)
{
stat_tap_table_item_type* field_value;
g_assert(table_index < stat_table->num_elements);
@ -221,7 +221,7 @@ stat_tap_table_item_type* new_stat_tap_get_field_data(const new_stat_tap_table *
return &field_value[field_index];
}
void new_stat_tap_set_field_data(new_stat_tap_table *stat_table, guint table_index, guint field_index, stat_tap_table_item_type* field_data)
void new_stat_tap_set_field_data(stat_tap_table *stat_table, guint table_index, guint field_index, stat_tap_table_item_type* field_data)
{
stat_tap_table_item_type* field_value;
g_assert(table_index < stat_table->num_elements);
@ -236,11 +236,11 @@ void new_stat_tap_set_field_data(new_stat_tap_table *stat_table, guint table_ind
void reset_stat_table(new_stat_tap_ui* new_stat, new_stat_tap_gui_reset_cb gui_callback, void *callback_data)
{
guint i = 0;
new_stat_tap_table *stat_table;
stat_tap_table *stat_table;
for (i = 0; i < new_stat->tables->len; i++)
{
stat_table = g_array_index(new_stat->tables, new_stat_tap_table*, i);
stat_table = g_array_index(new_stat->tables, stat_tap_table*, i);
/* Give GUI the first crack at it before we clean up */
if (gui_callback)
@ -254,12 +254,12 @@ void reset_stat_table(new_stat_tap_ui* new_stat, new_stat_tap_gui_reset_cb gui_c
void free_stat_tables(new_stat_tap_ui* new_stat, new_stat_tap_gui_free_cb gui_callback, void *callback_data)
{
guint i = 0, element, field_index;
new_stat_tap_table *stat_table;
stat_tap_table *stat_table;
stat_tap_table_item_type* field_data;
for (i = 0; i < new_stat->tables->len; i++)
{
stat_table = g_array_index(new_stat->tables, new_stat_tap_table*, i);
stat_table = g_array_index(new_stat->tables, stat_tap_table*, i);
/* Give GUI the first crack at it before we clean up */
if (gui_callback)

View File

@ -125,11 +125,11 @@ typedef struct _stat_tap_table
guint num_elements;
stat_tap_table_item_type **elements;
} new_stat_tap_table;
} stat_tap_table;
typedef void (*new_stat_tap_gui_init_cb)(new_stat_tap_table* stat_table, void* gui_data); /* GTK+ only? */
typedef void (*new_stat_tap_gui_reset_cb)(new_stat_tap_table* stat_table, void* gui_data); /* GTK+ only? */
typedef void (*new_stat_tap_gui_free_cb)(new_stat_tap_table* stat_table, void* gui_data); /* GTK+ only? */
typedef void (*new_stat_tap_gui_init_cb)(stat_tap_table* stat_table, void* gui_data); /* GTK+ only? */
typedef void (*new_stat_tap_gui_reset_cb)(stat_tap_table* stat_table, void* gui_data); /* GTK+ only? */
typedef void (*new_stat_tap_gui_free_cb)(stat_tap_table* stat_table, void* gui_data); /* GTK+ only? */
/*
* UI information for a tap.
@ -141,21 +141,21 @@ typedef struct _new_stat_tap_ui {
const char *cli_string; /* initial part of the "-z" argument for statistic */
void (* stat_tap_init_cb)(struct _new_stat_tap_ui* new_stat, new_stat_tap_gui_init_cb gui_callback, void* gui_data);
tap_packet_cb packet_func;
void (* stat_tap_reset_table_cb)(new_stat_tap_table* table);
void (* stat_tap_free_table_item_cb)(new_stat_tap_table* table, guint row, guint column, stat_tap_table_item_type* field_data);
void (* stat_tap_reset_table_cb)(stat_tap_table* table);
void (* stat_tap_free_table_item_cb)(stat_tap_table* table, guint row, guint column, stat_tap_table_item_type* field_data);
void (* new_stat_filter_check_cb)(const char *opt_arg, const char **filter, char** err); /* Dissector chance to reject filter */
size_t nfields; /* number of fields */
stat_tap_table_item* fields;
size_t nparams; /* number of parameters */
tap_param *params; /* pointer to table of parameter info */
GArray *tables; /* An array of new_stat_tap_table* */
GArray *tables; /* An array of stat_tap_table* */
} new_stat_tap_ui;
/** tap data
*/
typedef struct _new_stat_data_t {
new_stat_tap_ui *new_stat_tap_data;
new_stat_tap_ui *stat_tap_data;
void *user_data; /**< "GUI" specifics (if necessary) */
} new_stat_data_t;
@ -170,13 +170,13 @@ WS_DLL_PUBLIC void register_stat_tap_ui(stat_tap_ui *ui, void *userdata);
WS_DLL_PUBLIC void register_new_stat_tap_ui(new_stat_tap_ui *ui);
WS_DLL_PUBLIC void new_stat_tap_iterate_tables(GFunc func, gpointer user_data);
WS_DLL_PUBLIC void new_stat_tap_get_filter(new_stat_tap_ui* new_stat, const char *opt_arg, const char **filter, char** err);
WS_DLL_PUBLIC new_stat_tap_table* new_stat_tap_init_table(const char *name, int num_fields, int num_elements,
WS_DLL_PUBLIC stat_tap_table* new_stat_tap_init_table(const char *name, int num_fields, int num_elements,
const char *filter_string, new_stat_tap_gui_init_cb gui_callback, void* gui_data);
WS_DLL_PUBLIC void new_stat_tap_add_table(new_stat_tap_ui* new_stat, new_stat_tap_table* table);
WS_DLL_PUBLIC void new_stat_tap_add_table(new_stat_tap_ui* new_stat, stat_tap_table* table);
WS_DLL_PUBLIC void new_stat_tap_init_table_row(new_stat_tap_table *stat_table, guint table_index, guint num_fields, const stat_tap_table_item_type* fields);
WS_DLL_PUBLIC stat_tap_table_item_type* new_stat_tap_get_field_data(const new_stat_tap_table *stat_table, guint table_index, guint field_index);
WS_DLL_PUBLIC void new_stat_tap_set_field_data(new_stat_tap_table *stat_table, guint table_index, guint field_index, stat_tap_table_item_type* field_data);
WS_DLL_PUBLIC void new_stat_tap_init_table_row(stat_tap_table *stat_table, guint table_index, guint num_fields, const stat_tap_table_item_type* fields);
WS_DLL_PUBLIC stat_tap_table_item_type* new_stat_tap_get_field_data(const stat_tap_table *stat_table, guint table_index, guint field_index);
WS_DLL_PUBLIC void new_stat_tap_set_field_data(stat_tap_table *stat_table, guint table_index, guint field_index, stat_tap_table_item_type* field_data);
WS_DLL_PUBLIC void reset_stat_table(new_stat_tap_ui* new_stat, new_stat_tap_gui_reset_cb gui_callback, void *callback_data);
/** Free all of the tables associated with a new_stat_tap_ui.

View File

@ -43,30 +43,30 @@ simple_draw(void *arg)
size_t i;
guint table_index, element, field_index;
stat_tap_table_item* field;
new_stat_tap_table* table;
stat_tap_table* table;
stat_tap_table_item_type* field_data;
gchar fmt_string[250];
/* printing results */
printf("\n");
printf("=====================================================================================================\n");
printf("%s:\n", stat_data->new_stat_tap_data->title);
printf("%s:\n", stat_data->stat_tap_data->title);
printf("Filter for statistics: %s\n", stats->filter ? stats->filter : "");
for (i = 0, field = stat_data->new_stat_tap_data->fields; i < stat_data->new_stat_tap_data->nfields; i++, field++)
for (i = 0, field = stat_data->stat_tap_data->fields; i < stat_data->stat_tap_data->nfields; i++, field++)
{
printf("%s |", field->column_name);
}
printf("\n");
/* To iterate is human, and to recurse is divine. I am human */
for (table_index = 0; table_index < stat_data->new_stat_tap_data->tables->len; table_index++)
for (table_index = 0; table_index < stat_data->stat_tap_data->tables->len; table_index++)
{
table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, table_index);
table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, table_index);
printf("%s\n", table->title);
for (element = 0; element < table->num_elements; element++)
{
for (field_index = 0, field = stat_data->new_stat_tap_data->fields; field_index < table->num_fields; field_index++, field++)
for (field_index = 0, field = stat_data->stat_tap_data->fields; field_index < table->num_fields; field_index++, field++)
{
field_data = new_stat_tap_get_field_data(table, element, field_index);
if (field_data->type == TABLE_ITEM_NONE) /* Nothing for us here */
@ -108,7 +108,7 @@ init_stat_table(new_stat_tap_ui *new_stat_tap, const char *filter)
ui = g_new0(table_stat_t, 1);
ui->filter = g_strdup(filter);
ui->stats.new_stat_tap_data = new_stat_tap;
ui->stats.stat_tap_data = new_stat_tap;
ui->stats.user_data = ui;
new_stat_tap->stat_tap_init_cb(new_stat_tap, NULL, NULL);

View File

@ -68,7 +68,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data)
}
static void
init_gtk_simple_stat_table(new_stat_tap_table* stat_table, void* gui_data)
init_gtk_simple_stat_table(stat_tap_table* stat_table, void* gui_data)
{
guint i;
new_stat_data_t* stat_data = (new_stat_data_t*)gui_data;
@ -81,7 +81,7 @@ init_gtk_simple_stat_table(new_stat_tap_table* stat_table, void* gui_data)
/* XXX - Use # columns/fields, etc to compute a better value */
gtk_window_set_default_size(GTK_WINDOW(ss->gtk_data.win), 600, 300);
for (i = 0, columns = start_columns, field = stat_data->new_stat_tap_data->fields;
for (i = 0, columns = start_columns, field = stat_data->stat_tap_data->fields;
i < stat_table->num_fields;
i++, columns++, field++)
{
@ -121,7 +121,7 @@ simple_stat_draw(void *arg)
GtkListStore *store;
new_stat_data_t *stats = (new_stat_data_t*)arg;
simple_stat_t *ss = (simple_stat_t*)stats->user_data;
new_stat_tap_table* table;
stat_tap_table* table;
stat_tap_table_item* field;
stat_tap_table_item_type* field_data;
GtkTreeIter iter;
@ -132,7 +132,7 @@ simple_stat_draw(void *arg)
gtk_list_store_clear(store);
/* XXX - Only support a single table at the moment */
table = g_array_index(stats->new_stat_tap_data->tables, new_stat_tap_table*, table_index);
table = g_array_index(stats->stat_tap_data->tables, stat_tap_table*, table_index);
for (element = 0; element < table->num_elements; element++)
{
@ -143,7 +143,7 @@ simple_stat_draw(void *arg)
gtk_list_store_append(store, &iter);
for (field = stats->new_stat_tap_data->fields; field_index < table->num_fields; field_index++, field++)
for (field = stats->stat_tap_data->fields; field_index < table->num_fields; field_index++, field++)
{
field_data = new_stat_tap_get_field_data(table, element, field_index);
@ -172,7 +172,7 @@ simple_stat_draw(void *arg)
}
static void
reset_table_data(new_stat_tap_table* table _U_, void* gui_data)
reset_table_data(stat_tap_table* table _U_, void* gui_data)
{
GtkListStore *store;
gtk_simplestat_t_t* gtk_data = (gtk_simplestat_t_t*)gui_data;
@ -187,7 +187,7 @@ simple_stat_reset(void *arg)
new_stat_data_t *stats = (new_stat_data_t*)arg;
simple_stat_t *ss = (simple_stat_t*)stats->user_data;
reset_stat_table(stats->new_stat_tap_data, reset_table_data, &ss->gtk_data);
reset_stat_table(stats->stat_tap_data, reset_table_data, &ss->gtk_data);
set_window_title(ss->gtk_data.win, ss->new_stat_tap->title);
}
@ -214,7 +214,7 @@ init_simple_stat_tables(new_stat_tap_ui *new_stat_tap, const char *filter)
ss->filter = g_strdup(filter);
ss->new_stat_tap = new_stat_tap;
ss->data.new_stat_tap_data = new_stat_tap;
ss->data.stat_tap_data = new_stat_tap;
ss->data.user_data = ss;
new_stat_tap->stat_tap_init_cb(new_stat_tap, init_gtk_simple_stat_table, &ss->data);

View File

@ -197,8 +197,8 @@ void SimpleStatisticsDialog::addMissingRows(struct _new_stat_data_t *stat_data)
// the top-level tree item text set to the column labels for that table.
// Add any missing tables and rows.
for (guint table_idx = 0; table_idx < stat_data->new_stat_tap_data->tables->len; table_idx++) {
new_stat_tap_table* st_table = g_array_index(stat_data->new_stat_tap_data->tables, new_stat_tap_table*, table_idx);
for (guint table_idx = 0; table_idx < stat_data->stat_tap_data->tables->len; table_idx++) {
stat_tap_table* st_table = g_array_index(stat_data->stat_tap_data->tables, stat_tap_table*, table_idx);
QTreeWidgetItem *ti = NULL;
if ((int) table_idx >= statsTreeWidget()->topLevelItemCount()) {
@ -227,7 +227,7 @@ void SimpleStatisticsDialog::tapReset(void *sd_ptr)
SimpleStatisticsDialog *ss_dlg = static_cast<SimpleStatisticsDialog *>(sd->user_data);
if (!ss_dlg) return;
reset_stat_table(sd->new_stat_tap_data, NULL, NULL);
reset_stat_table(sd->stat_tap_data, NULL, NULL);
ss_dlg->statsTreeWidget()->clear();
}
@ -256,7 +256,7 @@ void SimpleStatisticsDialog::tapDraw(void *sd_ptr)
void SimpleStatisticsDialog::fillTree()
{
new_stat_data_t stat_data;
stat_data.new_stat_tap_data = stu_;
stat_data.stat_tap_data = stu_;
stat_data.user_data = this;
stu_->stat_tap_init_cb(stu_, NULL, NULL);