Changeset de74f88


Ignore:
Timestamp:
02/13/15 13:51:44 (6 years ago)
Author:
Richard Sanger <rsangerarj@…>
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:
1ebc4bd
Parents:
4631115
Message:

Fix some DAG compile issues from the merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_dag25.c

    r4631115 rde74f88  
    890890
    891891        /* DUCK doesn't have a format header */
    892         packet->header = 0;
    893         packet->payload = packet->buffer;
    894 
    895         /* No need to check if we can get DUCK or not - we're modern
    896         * enough so just grab the DUCK info */
    897         if ((ioctl(FORMAT_DATA->device->fd, LIBTRACE_DUCK_IOCTL,
    898                                         (duckinf_t *)packet->payload) < 0)) {
    899                 trace_set_err(libtrace, errno, "Error using DUCK ioctl");
     892        packet->header = 0;
     893        packet->payload = packet->buffer;
     894
     895        /* No need to check if we can get DUCK or not - we're modern
     896        * enough so just grab the DUCK info */
     897        if ((ioctl(FORMAT_DATA_FIRST->device->fd, LIBTRACE_DUCK_IOCTL,
     898                   (duckinf_t *)packet->payload) < 0)) {
     899                trace_set_err(libtrace, errno, "Error using DUCK ioctl");
    900900                DUCK.duck_freq = 0;
    901                 return -1;
    902         }
    903 
    904         packet->type = LIBTRACE_DUCK_VERSION;
     901                return -1;
     902        }
     903
     904        packet->type = LIBTRACE_DUCK_VERSION;
    905905
    906906        /* Set the packet's trace to point at a DUCK trace, so that the
    907907         * DUCK format functions will be called on the packet rather than the
    908908         * DAG ones */
    909         if (!DUCK.dummy_duck)
    910                 DUCK.dummy_duck = trace_create_dead("duck:dummy");
    911         packet->trace = DUCK.dummy_duck;
    912         DUCK.last_duck = DUCK.last_pkt;
    913         return sizeof(duckinf_t);
     909        if (!DUCK.dummy_duck)
     910                DUCK.dummy_duck = trace_create_dead("duck:dummy");
     911        packet->trace = DUCK.dummy_duck;
     912        DUCK.last_duck = DUCK.last_pkt;
     913        return sizeof(duckinf_t);
    914914}
    915915
     
    12171217                                libtrace_packet_t *packet)
    12181218{
     1219        int size = 0;
    12191220        dag_record_t *erfptr = NULL;
    12201221        int numbytes = 0;
     
    12271228        maxwait.tv_usec = 250000;
    12281229
    1229         /* Check if we're due for a DUCK report */
     1230        /* Check if we're due for a DUCK report */
    12301231        size = dag_get_duckinfo(libtrace, packet);
    12311232
Note: See TracChangeset for help on using the changeset viewer.