*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifdef HAVE_CONFIG_H
fdata->cum_bytes = cum_bytes + phdr->len;
fdata->cap_len = phdr->caplen;
fdata->file_off = offset;
+ fdata->subnum = 0;
/* To save some memory, we coerce it into a gint16 */
g_assert(phdr->pkt_encap <= G_MAXINT16);
fdata->lnk_t = (gint16) phdr->pkt_encap;
- fdata->abs_ts.secs = phdr->ts.secs;
- fdata->abs_ts.nsecs = phdr->ts.nsecs;
- fdata->shift_offset.secs = 0;
- fdata->shift_offset.nsecs = 0;
fdata->flags.passed_dfilter = 0;
fdata->flags.dependent_of_displayed = 0;
fdata->flags.encoding = PACKET_CHAR_ENC_CHAR_ASCII;
fdata->flags.has_ts = (phdr->presence_flags & WTAP_HAS_TS) ? 1 : 0;
fdata->flags.has_if_id = (phdr->presence_flags & WTAP_HAS_INTERFACE_ID) ? 1 : 0;
fdata->color_filter = NULL;
+ fdata->abs_ts.secs = phdr->ts.secs;
+ fdata->abs_ts.nsecs = phdr->ts.nsecs;
+ fdata->shift_offset.secs = 0;
+ fdata->shift_offset.nsecs = 0;
+ fdata->rel_ts.secs = 0;
+ fdata->rel_ts.nsecs = 0;
+ fdata->del_dis_ts.secs = 0;
+ fdata->del_dis_ts.nsecs = 0;
+ fdata->del_cap_ts.secs = 0;
+ fdata->del_cap_ts.nsecs = 0;
fdata->opt_comment = phdr->opt_comment;
}
void
frame_data_cleanup(frame_data *fdata)
{
- if (fdata->pfd)
+ if (fdata->pfd) {
g_slist_free(fdata->pfd);
+ fdata->pfd = NULL;
+ }
- fdata->pfd = NULL;
+ /* XXX, frame_data_cleanup() is called when redissecting (rescan_packets()),
+ * which might be triggered by lot of things, like: preferences change, setting manual address resolve, etc.. (grep by redissect_packets)
+ * fdata->opt_comment can be set by user, which we must not discard when redissecting.
+ */
+#if 0
+ if (fdata->opt_comment) {
+ g_free(fdata->opt_comment);
+ fdata->opt_comment = NULL;
+ }
+#endif
}
-