Revoked the change to cDevice::GetDevice() that was introduced in version 1.4.1-2

This commit is contained in:
Klaus Schmidinger 2006-08-27 08:42:31 +02:00
parent 1305406f0a
commit c2e2673629
3 changed files with 12 additions and 5 deletions

View File

@ -4888,3 +4888,10 @@ Video Disk Recorder Revision History
by Petri Hintukainen).
- Fixed handling "Ca Info" in case the CAM sends this again if the smart card is
replaced with a different one.
2006-08-27: Version 1.4.2
- Revoked the change to cDevice::GetDevice() that was introduced in version 1.4.1-2,
which made it prefer any device that's already receiving and doesn't require
detatching receivers. This change has caused some unwanted behavior, so further
testing is necessary.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.h 1.266 2006/08/14 09:49:22 kls Exp $
* $Id: config.h 1.267 2006/08/26 14:16:34 kls Exp $
*/
#ifndef __CONFIG_H
@ -21,8 +21,8 @@
// VDR's own version number:
#define VDRVERSION "1.4.1-5"
#define VDRVERSNUM 10401 // Version * 10000 + Major * 100 + Minor
#define VDRVERSION "1.4.2"
#define VDRVERSNUM 10402 // Version * 10000 + Major * 100 + Minor
// The plugin API's version number:

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: device.c 1.135 2006/08/12 11:33:34 kls Exp $
* $Id: device.c 1.136 2006/08/26 14:11:03 kls Exp $
*/
#include "device.h"
@ -292,7 +292,7 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDe
// to their individual severity, where the one listed first will make the most
// difference, because it results in the most significant bit of the result.
uint imp = 0;
imp <<= 1; imp |= !device[i]->Receiving(true) || ndr; // use receiving devices if we don't need to detach existing receivers
imp <<= 1; imp |= !device[i]->Receiving() || ndr; // use receiving devices if we don't need to detach existing receivers
imp <<= 1; imp |= device[i]->Receiving(); // avoid devices that are receiving
imp <<= 1; imp |= device[i] == cTransferControl::ReceiverDevice(); // avoid the Transfer Mode receiver device
imp <<= 8; imp |= min(max(device[i]->Priority() + MAXPRIORITY, 0), 0xFF); // use the device with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used)