Fix leading zeros of packetTime
Status: Alpha
Brought to you by:
bdash
capturemodule.c does not preserve the correct magnitude of the microseconds from ts.tv_usec. For example, a packet with a correct timestamp of
1189639796.002450
is returned by pycap as
1189639796.245000
I fixed this by changing the sprintf() on line 125 from
sprintf(buffer, "%ld.%ld", (long) header.ts.tv_sec, (long) header.ts.tv_usec);
to
sprintf(buffer, "%ld.%06ld", (long) header.ts.tv_sec, (long) header.ts.tv_usec);
Context diff is attached.
Patch capturemodule.c to correct microseconds in packet timestamp