Changeset 89e2ff7


Ignore:
Timestamp:
11/25/16 11:18:42 (4 years ago)
Author:
Richard Sanger <rsanger@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
e3b6476
Parents:
caf7841
Message:

Fix trace_interrupt() with busy traces

Trace interrupt is now checked in the read loop, which also means
it works with trace files.

Fixes #36

Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    r0cdd231 r89e2ff7  
    921921                        size_t ret;
    922922                        int filtret;
     923                        if (libtrace_halt)
     924                                return 0;
    923925                        /* Store the trace we are reading from into the packet opaque
    924926                         * structure */
  • lib/trace_parallel.c

    rb148e3b r89e2ff7  
    788788                assert(packet);
    789789
    790                 if (libtrace_halt) {
    791                         packet->error = 0;
    792                         break;
    793                 }
    794 
    795790                // Check for messages that we expect MESSAGE_DO_PAUSE, (internal messages only)
    796791                if (libtrace_message_queue_try_get(&t->messages, &message) != LIBTRACE_MQ_FAILED) {
     
    892887        /* Read nb_packets */
    893888        for (i = 0; i < nb_packets; ++i) {
    894                 if (libtrace_halt) {
    895                         break;
    896                 }
    897889                packets[i]->error = trace_read_packet(libtrace, packets[i]);
    898890
     
    17071699        libtrace->perpkt_threads = NULL;
    17081700        /* Set a global which says we are using a parallel trace. This is
    1709          * for backwards compatability due to changes when destroying packets */
     1701         * for backwards compatibility due to changes when destroying packets */
    17101702        libtrace_parallel = 1;
    17111703
Note: See TracChangeset for help on using the changeset viewer.