Changeset 91ea76c for lib


Ignore:
Timestamp:
05/28/12 14:07:07 (10 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:
16c598d
Parents:
b3edbe9
Message:
  • Detect if a user is attempting to read a compressed format that their libtrace build does not support and provide an appropriate error. Previously, we'd just try to read the trace with a stdout reader, resulting in some very confusing results.
Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/format_helper.c

    r3787331 r91ea76c  
    266266        io_t *io=wandio_create(trace->uridata);
    267267        if (!io) {
    268                 trace_set_err(trace,errno,"Unable to open %s",trace->uridata);
     268                if (errno != 0) {
     269                        trace_set_err(trace,errno,"Unable to open %s",trace->uridata);
     270                } else {
     271                        trace_set_err(trace,TRACE_ERR_UNSUPPORTED_COMPRESS,"Unsupported compression error: %s", trace->uridata);
     272                }
    269273        }
    270274        return io;
  • lib/libtrace.h.in

    rf440dc0 r91ea76c  
    226226        TRACE_ERR_BAD_FILTER    = -9,
    227227        /** RT communication breakdown */
    228         TRACE_ERR_RT_FAILURE    = -10
     228        TRACE_ERR_RT_FAILURE    = -10,
     229        /** Compression format unsupported */
     230        TRACE_ERR_UNSUPPORTED_COMPRESS  = -11
    229231};
    230232
     
    744746        LT_BITFIELD32      to_ds:1;     /**< Packet to Distribution Service */
    745747#endif
     748       
    746749        uint16_t     duration;  /**< Duration value for NAV calculation */
    747750        uint8_t      mac1[6];   /**< MAC Address 1 */
Note: See TracChangeset for help on using the changeset viewer.