forked from osmocom/wireshark
- Show droped packets counter after stopping a live capture.
- Don't show "Load time" during live capture. - Fix indentation and minor changes to comments. Should ignored packets be shown also when drops is known? svn path=/trunk/; revision=33440
This commit is contained in:
parent
7e2f42090d
commit
b722b193a6
|
@ -422,34 +422,41 @@ profile_bar_new(void)
|
|||
|
||||
|
||||
/*
|
||||
* update the packets statusbar to the current values
|
||||
* Update the packets statusbar to the current values
|
||||
*/
|
||||
void
|
||||
packets_bar_update(void)
|
||||
{
|
||||
if(packets_bar) {
|
||||
/* remove old status */
|
||||
/* Remove old status */
|
||||
if(packets_str) {
|
||||
g_free(packets_str);
|
||||
gtk_statusbar_pop(GTK_STATUSBAR(packets_bar), packets_ctx);
|
||||
}
|
||||
|
||||
/* do we have any packets? */
|
||||
/* Do we have any packets? */
|
||||
if(cfile.count) {
|
||||
if(cfile.drops_known) {
|
||||
packets_str = g_strdup_printf(" Packets: %u Displayed: %u Marked: %u Dropped: %u",
|
||||
cfile.count, cfile.displayed_count, cfile.marked_count, cfile.drops);
|
||||
} else if (cfile.ignored_count > 0) {
|
||||
} else if (cfile.ignored_count > 0) {
|
||||
packets_str = g_strdup_printf(" Packets: %u Displayed: %u Marked: %u Ignored: %u",
|
||||
cfile.count, cfile.displayed_count, cfile.marked_count, cfile.ignored_count);
|
||||
} else {
|
||||
gulong computed_elapsed = cf_get_computed_elapsed();
|
||||
if(cfile.is_tempfile){
|
||||
/* Live capture */
|
||||
packets_str = g_strdup_printf(" Packets: %u Displayed: %u Marked: %u",
|
||||
cfile.count, cfile.displayed_count, cfile.marked_count);
|
||||
}else{
|
||||
/* Loading an existing file */
|
||||
gulong computed_elapsed = cf_get_computed_elapsed();
|
||||
|
||||
packets_str = g_strdup_printf(" Packets: %u Displayed: %u Marked: %u Load time: %lu:%02lu.%03lu",
|
||||
cfile.count, cfile.displayed_count, cfile.marked_count,
|
||||
computed_elapsed/60000,
|
||||
computed_elapsed%60000/1000,
|
||||
computed_elapsed%1000);
|
||||
packets_str = g_strdup_printf(" Packets: %u Displayed: %u Marked: %u Load time: %lu:%02lu.%03lu",
|
||||
cfile.count, cfile.displayed_count, cfile.marked_count,
|
||||
computed_elapsed/60000,
|
||||
computed_elapsed%60000/1000,
|
||||
computed_elapsed%1000);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
packets_str = g_strdup(" No Packets");
|
||||
|
@ -459,7 +466,7 @@ packets_bar_update(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* update the packets statusbar to the current values
|
||||
* Update the packets statusbar to the current values
|
||||
*/
|
||||
void
|
||||
profile_bar_update(void)
|
||||
|
@ -706,6 +713,7 @@ statusbar_capture_update_finished_cb(capture_options *capture_opts)
|
|||
/* Pop the "<live capture in progress>" message off the status bar. */
|
||||
statusbar_pop_file_msg();
|
||||
statusbar_set_filename(cf->filename, cf->f_datalen, &(cf->elapsed_time));
|
||||
packets_bar_update();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue