Add NEW_PACKET_LIST guard

svn path=/trunk/; revision=30004
This commit is contained in:
Kovarththanan Rajaratnam 2009-09-20 08:51:30 +00:00
parent a569e8d5b8
commit 5cd06c69a9
1 changed files with 7 additions and 4 deletions

View File

@ -130,16 +130,19 @@ void new_window_cb(GtkWidget *w _U_)
*bv_nb_ptr;
struct PacketWinData *DataPtr;
int i;
#ifdef NEW_PACKET_LIST
int err;
gchar *err_info;
/* With the new packetlists "lazy columns" it's neccesary to reread the frame */
if (!wtap_seek_read(cfile.wth, cfile.current_frame->file_off, &cfile.pseudo_header,
cfile.pd, cfile.current_frame->cap_len, &err, &err_info)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
cf_read_error_message(err, err_info), cfile.filename);
return;
cfile.pd, cfile.current_frame->cap_len, &err, &err_info)) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
cf_read_error_message(err, err_info), cfile.filename);
return;
}
#endif
/* Allocate data structure to represent this window. */
DataPtr = (struct PacketWinData *) g_malloc(sizeof(struct PacketWinData));