Changeset 1331
- Timestamp:
- 18/03/08 14:12:36 (10 months ago)
- Files:
-
- trunk/lib/format_erf.c (modified) (2 diffs)
- trunk/lib/format_pcap.c (modified) (1 diff)
- trunk/lib/format_pcapfile.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/format_erf.c
r1330 r1331 386 386 387 387 /* Unknown/corrupt */ 388 if (((dag_record_t *)packet->buffer)->type >= 10) {388 if (((dag_record_t *)packet->buffer)->type >= TYPE_AAL2) { 389 389 trace_set_err(libtrace, TRACE_ERR_BAD_PACKET, "Corrupt or Unknown ERF type"); 390 390 return -1; … … 609 609 return trace_get_capture_length(packet); 610 610 } 611 /* Reset cached capture length - otherwise we will both return the 612 * wrong value here and subsequent get_capture_length() calls will 613 * return the wrong value. */ 614 packet->capture_length = -1; 611 615 erfptr = (dag_record_t *)packet->header; 612 616 erfptr->rlen = htons(size + erf_get_framing_length(packet)); trunk/lib/format_pcap.c
r1319 r1331 559 559 return trace_get_capture_length(packet); 560 560 } 561 /* Reset the cached capture length */ 562 packet->capture_length = -1; 561 563 pcapptr = (struct pcap_pkthdr *)packet->header; 562 564 pcapptr->caplen = size; trunk/lib/format_pcapfile.c
r1319 r1331 497 497 return trace_get_capture_length(packet); 498 498 } 499 /* Reset the cached capture length */ 500 packet->capture_length = -1; 499 501 pcapptr = (libtrace_pcapfile_pkt_hdr_t *)packet->header; 500 502 pcapptr->caplen = swapl(packet->trace,(uint32_t)size);
