Ignore:
Timestamp:
10/31/06 17:09:16 (15 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
2f3a25e
Parents:
7d952cb
Message:

Fixed bug where tracesplit and associated tools were not flushing remaining data at the end of their execution.
Resolved warning about unsigned/signed comparison in format_erf.
Added/removed a few newlines over the course of my debugging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracesplit/tracesplit.c

    r483abab r19c6cbe  
    99#include <getopt.h>
    1010#include <string.h>
     11#include <assert.h>
    1112
    1213char *strdupcat(char *str,char *app)
     
    121122
    122123        while(1) {
     124               
    123125                if (trace_read_packet(input,packet)<1) {
    124126                        break;
    125127                }
    126 
    127 
     128               
    128129                if (filter && !trace_apply_filter(filter,packet)) {
    129130                        continue;
     
    160161                        totbyteslast=totbytes;
    161162                }
    162 
    163163                if (!output) {
    164164                        char *buffer;
     
    190190                        trace_set_capture_length(packet,trace_get_wire_length(packet));
    191191                }
    192 
     192               
    193193                if (trace_write_packet(output,packet)==-1) {
    194194                        trace_perror_output(output,"write_packet");
    195195                        break;
    196196                }
    197         }
    198 
    199         if (!output)
    200                 trace_destroy_output(output);
     197
     198        }
     199
     200        if (trace_is_err(input)) {
     201                trace_perror(input, "Reading packets");
     202        }
     203       
     204        trace_destroy(input);
     205        trace_destroy_output(output);
    201206
    202207        trace_destroy_packet(packet);
Note: See TracChangeset for help on using the changeset viewer.