Changes in / [9c86dee:ffe6fae]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/tracesplit/tracesplit.c
r47d4f8c r4c5bbfc 326 326 if (jump) { 327 327 /* Skip headers */ 328 void*newpacket = perform_jump(*packet, jump);328 struct libtrace_packet_t *newpacket = perform_jump(*packet, jump); 329 329 if (newpacket) { 330 trace_destroy_packet(*packet); 331 *packet = newpacket; 330 /* If an IP header was found on the nth layer down 331 * write out the packet */ 332 if (trace_write_packet(output, newpacket)==-1) { 333 trace_perror_output(output,"write_packet"); 334 return -1; 335 } 336 /* Then destroy the packet */ 337 trace_destroy_packet(newpacket); 332 338 } 333 else /* Skip packet */339 else /* Skip packet - Payload ran out before getting to nth layer */ 334 340 return 1; 335 } 336 337 if (trace_write_packet(output, *packet)==-1) {341 } else { 342 343 if (trace_write_packet(output, *packet)==-1) { 338 344 trace_perror_output(output,"write_packet"); 339 345 return -1; 346 } 340 347 } 341 348
Note: See TracChangeset
for help on using the changeset viewer.