From c0fe31579754e55b5850366cc7f9ad894b918870 Mon Sep 17 00:00:00 2001 From: Sam Stenvall Date: Tue, 25 Jun 2024 15:05:20 +0300 Subject: [PATCH] Move setup_switch() call to axe_wakup instead of axe_get_signal --- src/axe.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/axe.c b/src/axe.c index a599264c06..080c07db8b 100644 --- a/src/axe.c +++ b/src/axe.c @@ -233,10 +233,17 @@ int axe_wakeup(adapter *_ad, int fe_fd, int voltage) { ad = get_adapter(i); if (ad == NULL || is_adapter_disabled(i)) continue; + LOG("axe_wakeup: waking adapter %d, fd %d", i, ad->fe2); if (ioctl(ad->fe2, FE_SET_VOLTAGE, voltage) == -1) - LOG("axe_wakeup: FE_SET_VOLTAGE failed fd %d: %s", ad->fe2, - strerror(errno)); + LOG("axe_wakeup: FE_SET_VOLTAGE failed fd %d: %s", ad->fe2, + strerror(errno)); + + if (ad->status == 0 && + ((ad->tp.diseqc_param.switch_type == SWITCH_JESS) || + (ad->tp.diseqc_param.switch_type == SWITCH_UNICABLE))) { + axe_setup_switch(ad); + } } return 0; } @@ -723,12 +730,6 @@ int axe_get_signal(adapter *ad) { ad->status = status; ad->ber = ber; - if (ad->status == 0 && - ((ad->tp.diseqc_param.switch_type == SWITCH_JESS) || - (ad->tp.diseqc_param.switch_type == SWITCH_UNICABLE))) { - axe_setup_switch(ad); - } - adapter_unlock(ad->id); return 0; }