diff options
-rw-r--r-- | src/server/PostProcessor.cpp | 1 | ||||
-rw-r--r-- | src/server/PreProcessor.cpp | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/server/PostProcessor.cpp b/src/server/PostProcessor.cpp index 74493b51..783d1f35 100644 --- a/src/server/PostProcessor.cpp +++ b/src/server/PostProcessor.cpp @@ -41,7 +41,6 @@ PostProcessor::append(ProcessContext& context, Event* first, Event* last) { assert(first); assert(last); - assert(!last->next()); if (_head.get()) { _tail.get()->next(first); _tail = last; diff --git a/src/server/PreProcessor.cpp b/src/server/PreProcessor.cpp index d5662c1d..dbc88d4f 100644 --- a/src/server/PreProcessor.cpp +++ b/src/server/PreProcessor.cpp @@ -67,8 +67,10 @@ PreProcessor::event(Event* const ev) unsigned PreProcessor::process(ProcessContext& context, PostProcessor& dest, bool limit) { - if (!_head.get()) + Event* const head = _head.get(); + if (!head) { return 0; + } /* Limit the maximum number of queued events to process per cycle. This makes the process callback (more) realtime-safe by preventing being @@ -79,7 +81,7 @@ PreProcessor::process(ProcessContext& context, PostProcessor& dest, bool limit) size_t num_events_processed = 0; - Event* ev = _head.get(); + Event* ev = head; Event* last = ev; while (ev && ev->is_prepared() && ev->time() < context.end()) { @@ -99,7 +101,7 @@ PreProcessor::process(ProcessContext& context, PostProcessor& dest, bool limit) Event* next = (Event*)last->next(); last->next(NULL); assert(!last->next()); - dest.append(context, _head.get(), last); + dest.append(context, head, last); _head = next; if (!next) _tail = NULL; |