From Irfan Khan: fix a couple of bugs in the pppdump reader.
svn path=/trunk/; revision=4414
This commit is contained in:
parent
1409de29e4
commit
2953cd1a97
4
AUTHORS
4
AUTHORS
|
@ -960,6 +960,10 @@ Heinz Prantner <Heinz.Prantner[AT]radisys.com> {
|
|||
M2TP support
|
||||
}
|
||||
|
||||
Irfan Khan <ikhan[AT]qualcomm.com> {
|
||||
pppdump reader fixes
|
||||
}
|
||||
|
||||
Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to
|
||||
give his permission to use his version of snprintf.c.
|
||||
|
||||
|
|
|
@ -1275,6 +1275,7 @@ B<http://www.ethereal.com>.
|
|||
Pavel Mores <pvl[AT]uh.cz>
|
||||
Bernd Becker <bb[AT]bernd-becker.de>
|
||||
Heinz Prantner <Heinz.Prantner[AT]radisys.com>
|
||||
Irfan Khan <ikhan[AT]qualcomm.com>
|
||||
|
||||
Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to give his
|
||||
permission to use his version of snprintf.c.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* pppdump.c
|
||||
*
|
||||
* $Id: pppdump.c,v 1.12 2001/12/13 05:50:51 gram Exp $
|
||||
* $Id: pppdump.c,v 1.13 2001/12/17 22:22:42 guy Exp $
|
||||
*
|
||||
* Copyright (c) 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
*
|
||||
|
@ -332,7 +332,7 @@ process_data(pppdump_t *state, FILE_T fh, pkt_t *pkt, int n, guint8 *pd, int *er
|
|||
if (pkt->cnt > 0) {
|
||||
pkt->esc = FALSE;
|
||||
|
||||
num_written = pkt->cnt - 2;
|
||||
num_written = pkt->cnt;
|
||||
pkt->cnt = 0;
|
||||
if (num_written <= 0) {
|
||||
return 0;
|
||||
|
@ -471,17 +471,17 @@ collate(pppdump_t* state, FILE_T fh, int *err, guint8 *pd, int *num_bytes,
|
|||
/* What can we do? */
|
||||
break;
|
||||
|
||||
case PPPD_TIME_STEP_LONG:
|
||||
wtap_file_read_unknown_bytes(&time_long, sizeof(guint32), fh, err);
|
||||
state->offset += sizeof(guint32);
|
||||
state->timestamp = time_long;
|
||||
state->tenths = 0;
|
||||
break;
|
||||
|
||||
case PPPD_RESET_TIME:
|
||||
wtap_file_read_unknown_bytes(&time_long, sizeof(guint32), fh, err);
|
||||
state->offset += sizeof(guint32);
|
||||
state->tenths += time_long;
|
||||
state->timestamp = pntohl(&time_long);
|
||||
state->tenths = 0;
|
||||
break;
|
||||
|
||||
case PPPD_TIME_STEP_LONG:
|
||||
wtap_file_read_unknown_bytes(&time_long, sizeof(guint32), fh, err);
|
||||
state->offset += sizeof(guint32);
|
||||
state->tenths += pntohl(&time_long);
|
||||
|
||||
if (state->tenths >= 10) {
|
||||
state->timestamp += state->tenths / 10;
|
||||
|
|
Loading…
Reference in New Issue