bugfix to #649: first convert to microseconds, then eventually swap byte ordering...
authorUlf Lamping <ulf.lamping@web.de>
Sat, 31 Dec 2005 11:48:32 +0000 (11:48 -0000)
committerUlf Lamping <ulf.lamping@web.de>
Sat, 31 Dec 2005 11:48:32 +0000 (11:48 -0000)
svn path=/trunk/; revision=16925

wiretap/snoop.c

index c0aa19e0ee3d4f19f5fabd8cb0e9521aeb171467..1c0125c159c888e9c423b4eb6c689ac1d4f71427 100644 (file)
@@ -810,7 +810,7 @@ static gboolean snoop_dump(wtap_dumper *wdh,
        rec_hdr.rec_len = g_htonl(reclen);
        rec_hdr.cum_drops = 0;
        rec_hdr.ts_sec = g_htonl(phdr->ts.secs);
-       rec_hdr.ts_usec = g_htonl(phdr->ts.nsecs) / 1000;
+       rec_hdr.ts_usec = g_htonl(phdr->ts.nsecs / 1000);
        nwritten = fwrite(&rec_hdr, 1, sizeof rec_hdr, wdh->fh);
        if (nwritten != sizeof rec_hdr) {
                if (nwritten == 0 && ferror(wdh->fh))