Changeset 4c484de


Ignore:
Timestamp:
01/04/13 13:40:15 (8 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:
ebafa5d
Parents:
a8c3d1d
Message:
  • Actually set a useful error message if we fail to open a file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_helper.c

    r1935565 r4c484de  
    261261iow_t *trace_open_file_out(libtrace_out_t *trace, int compress_type, int level, int fileflag)
    262262{
     263        iow_t *io = NULL;
    263264        assert(level<10);
    264265        assert(level>=0);
    265266
    266         return wandio_wcreate(trace->uridata, compress_type, level, fileflag);
     267        io = wandio_wcreate(trace->uridata, compress_type, level, fileflag);
     268
     269        if (!io) {
     270                trace_set_err_out(trace, errno, "Unable to create output file %s", trace->uridata);
     271        }
     272        return io;
    267273}
    268274
Note: See TracChangeset for help on using the changeset viewer.