nhttpd neutrinoapi: use channel camap in place of global pmt_caids

This commit is contained in:
[CST] Focus
2012-01-13 15:12:01 +04:00
parent 7a5d87d6b1
commit ffd335adaa

View File

@@ -35,7 +35,7 @@
#include <dmx.h> #include <dmx.h>
#include <zapit/satconfig.h> #include <zapit/satconfig.h>
#include <zapit/client/zapitclient.h> #include <zapit/client/zapitclient.h>
#include <zapit/channel.h> #include <zapit/zapit.h>
#include <zapit/bouquets.h> #include <zapit/bouquets.h>
#include <zapit/getservices.h> #include <zapit/getservices.h>
@@ -457,15 +457,20 @@ std::string CNeutrinoAPI::getAudioInfoAsString(void) {
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
std::string CNeutrinoAPI::getCryptInfoAsString(void) { std::string CNeutrinoAPI::getCryptInfoAsString(void) {
extern int pmt_caids[4][11]; unsigned short i;
unsigned short i,j;
std::stringstream out; std::stringstream out;
std::string casys[11]={"Irdeto:","Betacrypt:","Seca:","Viaccess:","Nagra:","Conax: ","Cryptoworks:","Videoguard:","EBU:","XCrypt:","PowerVU:"}; std::string casys[11]= {"Irdeto:","Betacrypt:","Seca:","Viaccess:","Nagra:","Conax: ","Cryptoworks:","Videoguard:","EBU:","XCrypt:","PowerVU:"};
for(i=0;i<4;i++){ int caids[] = { 0x600, 0x1700, 0x0100, 0x0500, 0x1800, 0xB00, 0xD00, 0x900, 0x2600, 0x4a00, 0x0E00 };
for(j=0;j<11;j++){
if(pmt_caids[i][j]){ CZapitChannel * channel = CZapit::getInstance()->GetCurrentChannel();
out << casys[j] << hex << pmt_caids[i][j]<< "\n"; if(channel) {
} for (i = 0; i < 11; i++) {
for(casys_map_iterator_t it = channel->camap.begin(); it != channel->camap.end(); ++it) {
int caid = (*it) & 0xFF00;
if(caid == caids[i])
out << casys[i] << hex << (*it) << "\n";
}
} }
} }
return out.str(); return out.str();