- _trigger_match = 0;
- if ((trigger = sr_session_trigger_get(SigSession::_sr_session))) {
- for (l = trigger->stages; l && !_trigger_match; l = l->next) {
- stage = (struct sr_trigger_stage *)l->data;
- for (m = stage->matches; m && !_trigger_match; m = m->next) {
- match = (struct sr_trigger_match *)m->data;
- if (match->channel == _probe)
- _trigger_match = match->match;
- }
- }
- }
+ _trigger_match = nullptr;
+ if ((trigger = SigSession::_sr_session->trigger()))
+ for (auto stage : trigger->stages())
+ for (auto match : stage->matches())
+ if (match->channel() == _channel)
+ _trigger_match = match->type();