Rename capture_file.plist to capture_file.plist_start to make it consistent with capture_file.plist_end

svn path=/trunk/; revision=30047
This commit is contained in:
Kovarththanan Rajaratnam 2009-09-21 18:09:19 +00:00
parent 109875c775
commit 7ca137e294
8 changed files with 46 additions and 46 deletions

View File

@ -43,7 +43,7 @@ void
init_cap_file(capture_file *cf)
{
/* Initialize the capture file struct */
cf->plist = NULL;
cf->plist_start = NULL;
cf->plist_end = NULL;
cf->wth = NULL;
cf->filename = NULL;

View File

@ -83,7 +83,7 @@ typedef struct _capture_file {
#else
GMemChunk *plist_chunk; /* Memory chunk for frame_data structures */
#endif
frame_data *plist; /* Packet list */
frame_data *plist_start; /* Packet list */
frame_data *plist_end; /* Last packet in list */
frame_data *first_displayed; /* First frame displayed */
frame_data *last_displayed; /* Last frame displayed */

18
file.c
View File

@ -388,8 +388,8 @@ cf_reset_state(capture_file *cf)
cf->user_saved = FALSE;
#if GLIB_CHECK_VERSION(2,10,0)
if (cf->plist != NULL)
g_slice_free_chain(frame_data, cf->plist, next);
if (cf->plist_start != NULL)
g_slice_free_chain(frame_data, cf->plist_start, next);
#else
/* memory chunks have been deprecated in favor of the slice allocator,
* which has been added in 2.10
@ -403,7 +403,7 @@ cf_reset_state(capture_file *cf)
dfilter_free(cf->rfcode);
cf->rfcode = NULL;
}
cf->plist = NULL;
cf->plist_start = NULL;
cf->plist_end = NULL;
cf_unselect_packet(cf); /* nothing to select */
cf->first_displayed = NULL;
@ -1430,7 +1430,7 @@ read_packet(capture_file *cf, dfilter_t *dfcode,
if (plist_end != NULL)
plist_end->next = fdata;
else
cf->plist = fdata;
cf->plist_start = fdata;
cf->plist_end = fdata;
cf->f_datalen = offset + phdr->caplen;
@ -1912,7 +1912,7 @@ rescan_packets(capture_file *cf, const char *action, const char *action_item,
selected_frame_seen = FALSE;
for (fdata = cf->plist; fdata != NULL; fdata = fdata->next) {
for (fdata = cf->plist_start; fdata != NULL; fdata = fdata->next) {
/* Create the progress bar if necessary.
We check on every iteration of the loop, so that it takes no
longer than the standard time to create it (otherwise, for a
@ -2412,7 +2412,7 @@ ref_time_packets(capture_file *cf)
nstime_set_unset(&prev_dis_ts);
cum_bytes = 0;
for (fdata = cf->plist; fdata != NULL; fdata = fdata->next) {
for (fdata = cf->plist_start; fdata != NULL; fdata = fdata->next) {
/* just add some value here until we know if it is being displayed or not */
fdata->cum_bytes = cum_bytes + fdata->pkt_len;
@ -2515,7 +2515,7 @@ process_specified_packets(capture_file *cf, packet_range_t *range,
/* Iterate through the list of packets, printing the packets that
were selected by the current display filter. */
for (fdata = cf->plist; fdata != NULL; fdata = fdata->next) {
for (fdata = cf->plist_start; fdata != NULL; fdata = fdata->next) {
/* Create the progress bar if necessary.
We check on every iteration of the loop, so that it takes no
longer than the standard time to create it (otherwise, for a
@ -3858,7 +3858,7 @@ find_packet(capture_file *cf,
"%sEnd of capture exceeded!%s\n\n"
"Search is continued from the start of the capture.",
simple_dialog_primary_start(), simple_dialog_primary_end());
fdata = cf->plist; /* wrap around */
fdata = cf->plist_start; /* wrap around */
}
else
{
@ -3940,7 +3940,7 @@ cf_goto_frame(capture_file *cf, guint fnumber)
frame_data *fdata;
int row;
for (fdata = cf->plist; fdata != NULL && fdata->num < fnumber; fdata = fdata->next)
for (fdata = cf->plist_start; fdata != NULL && fdata->num < fnumber; fdata = fdata->next)
;
if (fdata == NULL) {

View File

@ -294,7 +294,7 @@ static void mark_all_frames(gboolean set)
frame_data *fdata;
/* XXX: we might need a progressbar here */
for (fdata = cfile.plist; fdata != NULL; fdata = fdata->next) {
for (fdata = cfile.plist_start; fdata != NULL; fdata = fdata->next) {
set_frame_mark(set,
fdata,
gtk_clist_find_row_from_data(GTK_CLIST(packet_list), fdata));
@ -306,10 +306,10 @@ void packet_list_update_marked_frames(void)
{
frame_data *fdata;
if (cfile.plist == NULL) return;
if (cfile.plist_start == NULL) return;
/* XXX: we might need a progressbar here */
for (fdata = cfile.plist; fdata != NULL; fdata = fdata->next) {
for (fdata = cfile.plist_start; fdata != NULL; fdata = fdata->next) {
if (fdata->flags.marked)
set_frame_mark(TRUE, fdata,
gtk_clist_find_row_from_data(GTK_CLIST(packet_list),

View File

@ -749,7 +749,7 @@ static void mark_all_frames(gboolean set)
frame_data *fdata;
/* XXX: we might need a progressbar here */
for (fdata = cfile.plist; fdata != NULL; fdata = fdata->next) {
for (fdata = cfile.plist_start; fdata != NULL; fdata = fdata->next) {
set_frame_mark(set, fdata);
}
mark_frames_ready();

View File

@ -72,7 +72,7 @@ static void packet_range_calc(packet_range_t *range) {
*/
current_count = 0;
for(packet = cfile.plist; packet != NULL; packet = packet->next) {
for(packet = cfile.plist_start; packet != NULL; packet = packet->next) {
current_count++;
if (cfile.current_frame == packet) {
range->selected_packet = current_count;
@ -101,7 +101,7 @@ static void packet_range_calc(packet_range_t *range) {
}
current_count = 0;
for(packet = cfile.plist; packet != NULL; packet = packet->next) {
for(packet = cfile.plist_start; packet != NULL; packet = packet->next) {
current_count++;
if (current_count >= mark_low &&
@ -140,7 +140,7 @@ static void packet_range_calc_user(packet_range_t *range) {
range->displayed_user_range_cnt = 0L;
current_count = 0;
for(packet = cfile.plist; packet != NULL; packet = packet->next) {
for(packet = cfile.plist_start; packet != NULL; packet = packet->next) {
current_count++;
if (value_is_in_range(range->user_range, current_count)) {

View File

@ -219,7 +219,7 @@ ph_stats_new(void)
tot_packets = 0;
tot_bytes = 0;
for (frame = cfile.plist; frame != NULL; frame = frame->next) {
for (frame = cfile.plist_start; frame != NULL; frame = frame->next) {
/* Create the progress bar if necessary.
We check on every iteration of the loop, so that
it takes no longer than the standard time to create

View File

@ -105,11 +105,11 @@ summary_fill_in(capture_file *cf, summary_tally *st)
st->marked_bytes = 0;
/* initialize the tally */
if (cf->plist != NULL) {
first_frame = cf->plist;
if (cf->plist_start != NULL) {
first_frame = cf->plist_start;
st->start_time = nstime_to_sec(&first_frame->abs_ts);
st->stop_time = nstime_to_sec(&first_frame->abs_ts);
cur_glist = cf->plist;
cur_glist = cf->plist_start;
for (i = 0; i < cf->count; i++) {
cur_frame = cur_glist;