If packet was modified fallback to generic clone
authorJakub Zawadzki <darkjames-ws@darkjames.pl>
Tue, 20 Aug 2013 19:53:24 +0000 (19:53 -0000)
committerJakub Zawadzki <darkjames-ws@darkjames.pl>
Tue, 20 Aug 2013 19:53:24 +0000 (19:53 -0000)
svn path=/trunk/; revision=51443

frame_tvbuff.c

index 67b8264a2a90c89b3378539961e5e01efbaebaf0..61ab0fa84f990fbd3093b2019f06c8cd9b3554b5 100644 (file)
@@ -211,11 +211,12 @@ frame_tvbuff_new(const frame_data *fd, const guint8 *buf)
 
        frame_tvb = (struct tvb_frame *) tvb;
 
-       /* XXX, how to handle fd->file_off == -1 (edited packet) ?? */
-       /* don't care, reassemble code was doing whole copy of data, so it'll work the same */
-
        /* XXX, wtap_can_seek() */
-       if (cfile.wth && cfile.wth->random_fh) {
+       if (cfile.wth && cfile.wth->random_fh 
+#ifdef WANT_PACKET_EDITOR
+               && fd->file_off != -1 /* generic clone for modified packets */
+#endif
+       ) {
                frame_tvb->wth = cfile.wth;
                frame_tvb->file_off = fd->file_off;
                frame_tvb->offset = 0;