Changeset 984f7da


Ignore:
Timestamp:
06/15/07 16:22:26 (14 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:
758c920
Parents:
a005846
Message:

Properly initialise the libtrace_t datastructure before returning a parse
error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    r36d51c8 r984f7da  
    304304        libtrace->format=NULL;
    305305       
    306         /* parse the URI to determine what sort of event we are dealing with */
    307         if ((uridata = trace_parse_uri(uri, &scan)) == 0) {
    308                 trace_set_err(libtrace,TRACE_ERR_BAD_FORMAT,"Bad uri format (%s)",uri);
    309                 return libtrace;
    310         }
    311        
    312306        libtrace->event.tdelta = 0.0;
    313307        libtrace->event.packet = NULL;
     
    318312        libtrace->started=false;
    319313
     314        /* parse the URI to determine what sort of event we are dealing with */
     315        if ((uridata = trace_parse_uri(uri, &scan)) == 0) {
     316                trace_set_err(libtrace,TRACE_ERR_BAD_FORMAT,"Bad uri format (%s)",uri);
     317                return libtrace;
     318        }
     319       
    320320        for (tmp=formats_list;tmp;tmp=tmp->next) {
    321321                if (strlen(scan) == strlen(tmp->name) &&
Note: See TracChangeset for help on using the changeset viewer.