mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Version 1.3.34
- Fixed a leftover 'summary.vdr' in vdr.5 (thanks to Peter Bieringer for reporting this one). - Fixed opening recording folders in case the last replayed recording no longer exists (reported by Udo Richter). - Fixed an unjustified "Error while accessing recording!" after deleting a recording from a subfolder. - Fixed handling the '.update' file in case the video directory is not at the default location (reported by Jon Burgess). - Fixed a crash in cConfig::Load() when compiling on the PPC (thanks to Sascha Volkenandt). - Fixed the FATALERRNO macro to check for a non-zero errno value (reported by Marco Schlüßler). - Added a check against MAXOSDAREAS in cOsd::CanHandleAreas() (reported by Udo Richter). - Fixed setting current menu item if the first one is non-selectable. - cOsdItem::cOsdItem() now has a 'Selectable' parameter. - Improved displaying 'sub-title' and 'bottom text' in the CAM menu. - Added status message "Resetting CAM..." for an immediate feedback when the CAM reset has been triggered. - The CAM menu now automatically updates itself in case of a progress display (as used, for instance, when updating the firmware via satellite). - Now skipping some funny characters sent by some CAMs at the beginning of strings. - The CAM menu is now completely closed when pressing the Menu key while inside a sub menu. - Reduced MAX_CONNECT_RETRIES in ci.c to 2 (waiting too long made the whole thing appear hanging). - Added status message "Opening CAM menu..." for an immediate feedback when the CAM menu has been requested. - Speeded up initial opening of the CAM menu. - Fixed handling of menus with no selectable items. - The character 0x8A in CAM menu strings is now mapped to a real newline. - The 'sub-title' and 'bottom text' in the CAM menu can now consist of several lines. - Improved the CAM enquiry menu.
This commit is contained in:
37
ci.c
37
ci.c
@@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: ci.c 1.28 2005/09/17 11:43:08 kls Exp $
|
||||
* $Id: ci.c 1.36 2005/10/03 12:58:22 kls Exp $
|
||||
*/
|
||||
|
||||
#include "ci.h"
|
||||
@@ -92,9 +92,17 @@ static char *CopyString(int Length, const uint8_t *Data)
|
||||
///< Copies the string at Data.
|
||||
///< \return Returns a pointer to a newly allocated string.
|
||||
{
|
||||
// Some CAMs send funny characters at the beginning of strings.
|
||||
// Let's just skip them:
|
||||
while (Length > 0 && (*Data == ' ' || *Data == 0x05 || *Data == 0x96 || *Data == 0x97)) {
|
||||
Length--;
|
||||
Data++;
|
||||
}
|
||||
char *s = MALLOC(char, Length + 1);
|
||||
strncpy(s, (char *)Data, Length);
|
||||
s[Length] = 0;
|
||||
// The character 0x8A is used as newline, so let's put a real '\n' in there:
|
||||
strreplace(s, 0x8A, '\n');
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -394,7 +402,7 @@ const uint8_t *cCiTransportConnection::Data(int &Length)
|
||||
return tpdu->Data(Length);
|
||||
}
|
||||
|
||||
#define MAX_CONNECT_RETRIES 20
|
||||
#define MAX_CONNECT_RETRIES 2
|
||||
|
||||
int cCiTransportConnection::CreateConnection(void)
|
||||
{
|
||||
@@ -1026,6 +1034,7 @@ public:
|
||||
cCiEnquiry *Enquiry(bool Clear = false);
|
||||
bool SendMenuAnswer(uint8_t Selection);
|
||||
bool SendAnswer(const char *Text);
|
||||
bool SendCloseMMI(void);
|
||||
};
|
||||
|
||||
cCiMMI::cCiMMI(int SessionId, cCiTransportConnection *Tc)
|
||||
@@ -1198,6 +1207,14 @@ bool cCiMMI::SendAnswer(const char *Text)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cCiMMI::SendCloseMMI(void)
|
||||
{
|
||||
dbgprotocol("%d: ==> Close MMI\n", SessionId());
|
||||
SendData(AOT_CLOSE_MMI, 0);
|
||||
//XXX return value of all SendData() calls???
|
||||
return true;
|
||||
}
|
||||
|
||||
// --- cCiMenu ---------------------------------------------------------------
|
||||
|
||||
cCiMenu::cCiMenu(cCiMMI *MMI, bool Selectable)
|
||||
@@ -1229,6 +1246,12 @@ bool cCiMenu::AddEntry(char *s)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cCiMenu::HasUpdate(void)
|
||||
{
|
||||
// If the mmi is gone, the menu shall be closed, which also qualifies as 'update'.
|
||||
return !mmi || mmi->HasUserIO();
|
||||
}
|
||||
|
||||
bool cCiMenu::Select(int Index)
|
||||
{
|
||||
cMutexLock MutexLock(&mutex);
|
||||
@@ -1242,6 +1265,11 @@ bool cCiMenu::Cancel(void)
|
||||
return Select(-1);
|
||||
}
|
||||
|
||||
bool cCiMenu::Abort(void)
|
||||
{
|
||||
return mmi && mmi->SendCloseMMI();
|
||||
}
|
||||
|
||||
// --- cCiEnquiry ------------------------------------------------------------
|
||||
|
||||
cCiEnquiry::cCiEnquiry(cCiMMI *MMI)
|
||||
@@ -1271,6 +1299,11 @@ bool cCiEnquiry::Cancel(void)
|
||||
return Reply(NULL);
|
||||
}
|
||||
|
||||
bool cCiEnquiry::Abort(void)
|
||||
{
|
||||
return mmi && mmi->SendCloseMMI();
|
||||
}
|
||||
|
||||
// --- cCiCaPmt --------------------------------------------------------------
|
||||
|
||||
// Ca Pmt List Management:
|
||||
|
||||
Reference in New Issue
Block a user