mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 15:02:58 +02:00
- formatting code using astyle
Conflicts: libarmbox/dmx.cpp libgeneric-pc/video_lib.h libspark/dmx.cpp Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "dvbci_appmgr.h"
|
||||
|
||||
/* prevent possibly segfaults: read at end of this file */
|
||||
/* prevent possibly segfaults: read at end of this file */
|
||||
#define yy_debug 0
|
||||
|
||||
eDVBCIApplicationManagerSession::eDVBCIApplicationManagerSession(eDVBCISlot *tslot)
|
||||
@@ -26,7 +26,7 @@ int eDVBCIApplicationManagerSession::receivedAPDU(const unsigned char *tag, cons
|
||||
{
|
||||
printf("[CI AM] SESSION(%d)/APP %02x %02x %02x: ", session_nb, tag[0], tag[1], tag[2]);
|
||||
for (int i = 0; i < len; i++)
|
||||
printf("%02x ", ((const unsigned char*)data)[i]);
|
||||
printf("%02x ", ((const unsigned char *)data)[i]);
|
||||
printf("\n");
|
||||
|
||||
if ((tag[0] == 0x9f) && (tag[1] == 0x80))
|
||||
@@ -38,21 +38,21 @@ int eDVBCIApplicationManagerSession::receivedAPDU(const unsigned char *tag, cons
|
||||
int dl;
|
||||
printf("[CI AM] application info:\n");
|
||||
printf("[CI AM] len: %d\n", len);
|
||||
printf("[CI AM] application_type: %d\n", ((unsigned char*)data)[0]);
|
||||
printf("[CI AM] application_manufacturer: %02x %02x\n", ((unsigned char*)data)[2], ((unsigned char*)data)[1]);
|
||||
printf("[CI AM] manufacturer_code: %02x %02x\n", ((unsigned char*)data)[4], ((unsigned char*)data)[3]);
|
||||
printf("[CI AM] application_type: %d\n", ((unsigned char *)data)[0]);
|
||||
printf("[CI AM] application_manufacturer: %02x %02x\n", ((unsigned char *)data)[2], ((unsigned char *)data)[1]);
|
||||
printf("[CI AM] manufacturer_code: %02x %02x\n", ((unsigned char *)data)[4], ((unsigned char *)data)[3]);
|
||||
printf(" menu string: ");
|
||||
dl = ((unsigned char*)data)[5];
|
||||
dl = ((unsigned char *)data)[5];
|
||||
if ((dl + 6) > len)
|
||||
{
|
||||
printf("[CI AM] warning, invalid length (%d vs %d)\n", dl + 6, len);
|
||||
dl = len - 6;
|
||||
}
|
||||
char str[dl + 1];
|
||||
memcpy(str, ((char*)data) + 6, dl);
|
||||
memcpy(str, ((char *)data) + 6, dl);
|
||||
str[dl] = '\0';
|
||||
for (int i = 0; i < dl; ++i)
|
||||
printf("%c", ((unsigned char*)data)[i + 6]);
|
||||
printf("%c", ((unsigned char *)data)[i + 6]);
|
||||
printf("\n");
|
||||
|
||||
strcpy(slot->name, str);
|
||||
@@ -111,16 +111,16 @@ int eDVBCIApplicationManagerSession::startMMI()
|
||||
bool eDVBCIApplicationManagerSession::readBlist()
|
||||
{
|
||||
int rc, i;
|
||||
char cSid[4] = {0,0,0,0};
|
||||
char cSid[4] = {0, 0, 0, 0};
|
||||
u16 Sid;
|
||||
FILE *fd;
|
||||
char blacklist_file[32];
|
||||
|
||||
sprintf(blacklist_file,"/etc/blacklist_slot_%d",slot->slot);
|
||||
sprintf(blacklist_file, "/etc/blacklist_slot_%d", slot->slot);
|
||||
|
||||
if (access(blacklist_file, F_OK) != 0)
|
||||
return false;
|
||||
fd = fopen(blacklist_file,"r");
|
||||
fd = fopen(blacklist_file, "r");
|
||||
if (!fd)
|
||||
return false;
|
||||
else
|
||||
@@ -139,7 +139,8 @@ bool eDVBCIApplicationManagerSession::readBlist()
|
||||
Sid = (u16)strtol(cSid, NULL, 16);
|
||||
slot->bsids.push_back(Sid);
|
||||
}
|
||||
} while (rc != EOF);
|
||||
}
|
||||
while (rc != EOF);
|
||||
fin:
|
||||
fclose(fd);
|
||||
}
|
||||
@@ -153,7 +154,7 @@ int eDVBCIApplicationManagerSession::checkBlist()
|
||||
{
|
||||
if (readBlist())
|
||||
{
|
||||
/* out commented: causes sometimes segfault when reboot....don't know why :( */
|
||||
/* out commented: causes sometimes segfault when reboot....don't know why :( */
|
||||
#if yy_debug
|
||||
printf("Blacked sids: %d > ", slot->bsids.size());
|
||||
for (unsigned int i = 0; i < slot->bsids.size(); i++)
|
||||
|
Reference in New Issue
Block a user