Ignore:
Timestamp:
11/26/18 16:50:48 (2 years ago)
Author:
Jacob Van Walraven <jcv9@…>
Branches:
develop
Children:
88b9798
Parents:
2ceec6a
Message:

Assertion cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/combiner_sorted.c

    ree6e802 rf6f3ae5  
    3434static int init_combiner(libtrace_t *t, libtrace_combine_t *c) {
    3535        int i = 0;
    36         assert(trace_get_perpkt_threads(t) > 0);
     36        /*assert(trace_get_perpkt_threads(t) > 0);*/
     37        if (trace_get_perpkt_threads(t) <= 0) {
     38                trace_set_err(t, TRACE_ERR_INIT_FAILED, "You must have atleast 1 processing thread");
     39                return -1;
     40        }
    3741        libtrace_vector_t *queues;
    3842        c->queues = calloc(sizeof(libtrace_vector_t), trace_get_perpkt_threads(t));
     
    105109
    106110        for (i = 0; i < trace_get_perpkt_threads(trace); i++) {
    107                 assert(libtrace_vector_get_size(&queues[i]) == 0);
     111                /*assert(libtrace_vector_get_size(&queues[i]) == 0);*/
     112                if (libtrace_vector_get_size(&queues[i]) != 0) {
     113                        trace_set_err(trace, TRACE_ERR_COMBINER,
     114                                "Failed to destory queues, A thread still has data in destroy()");
     115                        return;
     116                }
    108117                libtrace_vector_destroy(&queues[i]);
    109118        }
Note: See TracChangeset for help on using the changeset viewer.