Changeset 74ecbc7 for lib/libtrace.h.in


Ignore:
Timestamp:
03/21/14 16:23:48 (7 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:
dad224b
Parents:
1ca603b
Message:

Add more user-friendly checks for output file compression options

  • No longer assert fail if the level is outside the allowed range
  • Actually check that a valid compression method has been provided
  • Failing either check will result in NULL being returned by trace_open_file_out and the libtrace error being set appropriately
  • Added TRACE_OPTION_COMPRESSTYPE_LAST to compression method enum, so we can always easily tell if the value is outside the expected range.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h.in

    rf7bcbfb r74ecbc7  
    12101210        TRACE_OPTION_COMPRESSTYPE_ZLIB = 1, /**< GZip Compression */
    12111211        TRACE_OPTION_COMPRESSTYPE_BZ2  = 2, /**< BZip2 Compression */
    1212         TRACE_OPTION_COMPRESSTYPE_LZO  = 3  /**< LZO Compression */
     1212        TRACE_OPTION_COMPRESSTYPE_LZO  = 3,  /**< LZO Compression */
     1213        TRACE_OPTION_COMPRESSTYPE_LAST
    12131214} trace_option_compresstype_t;
    12141215
Note: See TracChangeset for help on using the changeset viewer.