From patchwork Thu Dec 22 13:56:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 38777 Received: from localhost ([127.0.0.1] helo=www.linuxtv.org) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cK3r5-0002PZ-Am; Thu, 22 Dec 2016 13:56:23 +0000 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cK3qw-0002PC-3i for vdr@linuxtv.org; Thu, 22 Dec 2016 13:56:14 +0000 X-tubIT-Incoming-IP: 88.198.76.220 Received: from racoon.tvdr.de ([88.198.76.220]) by mail.tu-berlin.de (exim-4.84_2/mailfrontend-7) with esmtp for id 1cK3qu-0004so-2X; Thu, 22 Dec 2016 14:56:14 +0100 Received: from dolphin.tvdr.de (dolphin.tvdr.de [192.168.1.2]) by racoon.tvdr.de (8.14.9/8.14.9) with ESMTP id uBMDuBK0001950 for ; Thu, 22 Dec 2016 14:56:11 +0100 Received: from [192.168.1.11] (falcon.tvdr.de [192.168.1.11]) by dolphin.tvdr.de (8.14.4/8.14.4) with ESMTP id uBMDuAgS003377 for ; Thu, 22 Dec 2016 14:56:11 +0100 To: VDR Mailing List References: <1464278314-28653-1-git-send-email-glenvt18@gmail.com> From: Klaus Schmidinger Message-ID: Date: Thu, 22 Dec 2016 14:56:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1464278314-28653-1-git-send-email-glenvt18@gmail.com> X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2016.12.22.135117 X-PMX-Spam: Gauge=X, Probability=10%, Report=' TO_IN_SUBJECT 0.5, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, IN_REP_TO 0, LEGITIMATE_NEGATE 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, NO_URI_HTTPS 0, REFERENCES 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __HAS_FROM 0, __HAS_MSGID 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __MOZILLA_USER_AGENT 0, __NO_HTML_TAG_RAW 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TO_IN_SUBJECT2 0, __TO_MALFORMED_2 0, __TO_NAME 0, __TO_NAME_DIFF_FROM_ACC 0, __TO_REAL_NAMES 0, __URI_NO_MAILTO 0, __URI_NO_WWW 0, __USER_AGENT 0' X-LSpam-Score: -1.1 (-) X-LSpam-Report: No, score=-1.1 required=5.0 tests=BAYES_00=-1.9, RDNS_NONE=0.793 autolearn=no autolearn_force=no Subject: Re: [vdr] [PATCH] cDevice::GetDeviceForTransponder(): fix a typo X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: VDR Mailing List Errors-To: vdr-bounces@linuxtv.org Sender: "vdr" On 26.05.2016 17:58, glenvt18 wrote: > d->MaySwitchTransponder(Channel) is always false here > > Please review, > Sergey Chernyavskiy. > > --- > device.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/device.c b/device.c > index 18867cd..542d120 100644 > --- a/device.c > +++ b/device.c > @@ -342,7 +342,7 @@ cDevice *cDevice::GetDeviceForTransponder(const cChannel *Channel, int Priority) > if (d->ProvidesTransponder(Channel)) { > if (d->MaySwitchTransponder(Channel)) > Device = d; // this device may switch to the transponder without disturbing any receiver or live view > - else if (!d->Occupied() && d->MaySwitchTransponder(Channel)) { // MaySwitchTransponder() implicitly calls Occupied() > + else if (!d->Occupied()) { // MaySwitchTransponder() implicitly calls Occupied() > if (d->Priority() < Priority && (!Device || d->Priority() < Device->Priority())) > Device = d; // use this one only if no other with less impact can be found > } This was introduced in version 1.7.29: with the change comment "Fixed handling recording with more than two bonded devices". While I tend to agree with you in that d->MaySwitchTransponder(Channel) is always false here, this must at least have fixed the problem at hand back then (it was the only file that has been modified for this fix). I'm therefore hesitant to remove this call and risk breaking something... Klaus --- device.c 2012/06/09 14:37:24 2.61 +++ device.c 2012/06/10 13:13:18 2.62 @@ -334,7 +334,7 @@ if (d->ProvidesTransponder(Channel)) { if (d->MaySwitchTransponder(Channel)) Device = d; // this device may switch to the transponder without disturbing any receiver or live view - else if (!d->Occupied()) { + else if (!d->Occupied() && d->MaySwitchTransponder(Channel)) { // MaySwitchTransponder() implicitly calls Occupied() if (d->Priority() < Priority && (!Device || d->Priority() < Device->Priority())) Device = d; // use this one only if no other with less impact can be found }