Ignore:
Timestamp:
09/15/15 15:08:34 (6 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, 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:
ccb89e4
Parents:
c968cfc
Message:

Rename libtrace_get_perpkt_count to trace_get_perpkt_threads

This is to be consistent with trace_set_perpkt_threads.

Remove 'packet' parameter from the first_packet callback.
trace_get_first_packet should be used to get the first packet instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/combiner_sorted.c

    rf625817 ra31e166  
    77static int init_combiner(libtrace_t *t, libtrace_combine_t *c) {
    88        int i = 0;
    9         assert(libtrace_get_perpkt_count(t) > 0);
     9        assert(trace_get_perpkt_threads(t) > 0);
    1010        libtrace_vector_t *queues;
    11         c->queues = calloc(sizeof(libtrace_vector_t), libtrace_get_perpkt_count(t));
     11        c->queues = calloc(sizeof(libtrace_vector_t), trace_get_perpkt_threads(t));
    1212        queues = c->queues;
    13         for (i = 0; i < libtrace_get_perpkt_count(t); ++i) {
     13        for (i = 0; i < trace_get_perpkt_threads(t); ++i) {
    1414                libtrace_vector_init(&queues[i], sizeof(libtrace_result_t));
    1515        }
     
    4141        libtrace_vector_t *queues = c->queues;
    4242        int i;
    43         for (i = 0; i < libtrace_get_perpkt_count(trace); ++i) {
     43        for (i = 0; i < trace_get_perpkt_threads(trace); ++i) {
    4444                libtrace_vector_apply_function(&queues[i], (vector_data_fn) libtrace_make_result_safe);
    4545        }
     
    5151        size_t a;
    5252        // Combine all results into queue 1
    53         for (i = 1; i < libtrace_get_perpkt_count(trace); ++i)
     53        for (i = 1; i < trace_get_perpkt_threads(trace); ++i)
    5454        {
    5555                libtrace_vector_append(&queues[0],&queues[i]);
     
    7777        libtrace_vector_t *queues = c->queues;
    7878
    79         for (i = 0; i < libtrace_get_perpkt_count(trace); i++) {
     79        for (i = 0; i < trace_get_perpkt_threads(trace); i++) {
    8080                assert(libtrace_vector_get_size(&queues[i]) == 0);
    8181                libtrace_vector_destroy(&queues[i]);
Note: See TracChangeset for help on using the changeset viewer.