Changeset f03fc17 for lib/format_wag.c


Ignore:
Timestamp:
02/17/06 10:38:30 (16 years ago)
Author:
Perry Lorier <perry@…>
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:
3d4d52d
Parents:
880aa58
Message:

Get rid of ->sourcetype, it was never used.
Cleanup some of the wag stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_wag.c

    r880aa58 rf03fc17  
    135135        }
    136136        if (S_ISCHR(buf.st_mode)) {
    137                 libtrace->sourcetype = TRACE_SOURCE_DEVICE;
    138137                               
    139138                INPUT.fd = open(CONNINFO.path, O_RDONLY);
     
    157156        if (!strncmp(CONNINFO.path,"-",1)) {
    158157                /* STDIN */
    159                 libtrace->sourcetype = TRACE_SOURCE_STDIN;
    160158                INPUT.file = LIBTRACE_FDOPEN(fileno(stdin),"r");
    161159        } else {
    162160                int fd;
    163161                /* TRACE */
    164                 libtrace->sourcetype = TRACE_SOURCE_TRACE;
    165162
    166163                /* we use an FDOPEN call to reopen an FD
     
    430427}
    431428
    432 static struct libtrace_eventobj_t wag_event_trace(struct libtrace_t *trace, struct libtrace_packet_t *packet) {
    433         switch(trace->sourcetype) {
    434                 case TRACE_SOURCE_DEVICE:
    435                         return trace_event_device(trace,packet);
    436                 default:
    437                         return trace_event_trace(trace,packet);
    438         }
    439 }
    440429static void wag_help() {
    441430        printf("wag format module: $Revision$\n");
     
    495484        NULL,                           /* set_capture_length */
    496485        wag_get_fd,                     /* get_fd */
    497         wag_event_trace,                /* trace_event */
     486        trace_event_device,             /* trace_event */
    498487        wag_help                        /* help */
    499488};
     
    530519        NULL,                           /* set_capture_length */
    531520        wag_get_fd,                     /* get_fd */
    532         wag_event_trace,                /* trace_event */
     521        trace_event_trace,              /* trace_event */
    533522        wtf_help                        /* help */
    534523};
Note: See TracChangeset for help on using the changeset viewer.