]> www.vanbest.org Git - sasc-ng.git/commitdiff
viaccess: re-enable loading of tps.bin
authorleslie <unknown>
Tue, 12 Aug 2008 12:12:38 +0000 (20:12 +0800)
committerleslie <unknown>
Tue, 12 Aug 2008 12:12:38 +0000 (20:12 +0800)
systems/viaccess/tps.c
systems/viaccess/tps.h

index 31b2ea545f808ba8ed657e44d837b5a8db052297..5e812b652d87f3f6294840a9ef8d4a2f4eaf1f3d 100644 (file)
@@ -645,14 +645,12 @@ void cTpsKeys::Check(time_t now, int cardnum)
     lastCheck.Set();
     }
   bool nokey=now+2*3600>last;
-/*
-  if(lastLoad.Elapsed()>(nokey ? LOADBIN_TIME/60 : LOADBIN_TIME)) {
+  if(tpsAuMode==AU_TPSBIN && lastLoad.Elapsed()>(nokey ? LOADBIN_TIME/60 : LOADBIN_TIME)) {
     PRINTF(L_SYS_TPSAU,"loading "TPSBIN" triggered");
     LoadBin();
     if(now>0) Purge(now);
     lastLoad.Set();
     }
-*/
   if(tpsAuMode==AU_STREAM && lastAu.Elapsed()>(nokey ? TPSAU_TIME/60 : TPSAU_TIME)) {
     if(ScSetup.AutoUpdate>0) {
       PRINTF(L_SYS_TPSAU,"TPS AU triggered");
@@ -867,7 +865,6 @@ bool cTpsKeys::ProcessAu(const cOpenTVModule *mod)
   return res;
 }
 
-/*
 bool cTpsKeys::LoadBin(void)
 {
   static const unsigned char mark[] = { 'T','P','S',0 };
@@ -914,7 +911,6 @@ void cTpsKeys::DecryptBin(const unsigned char *in, unsigned char *out)
     *((unsigned int *)out)=(var1<<(i+2)) | (var1>>(32-(i+2)));
     }
 }
-*/
 
 void cTpsKeys::PreLoad(void)
 {
index a452990eb9e11bf1a334c6306657b4e06a16c46e..a5574f23ee6029fafc285cc7e298dbaa20c45364 100644 (file)
@@ -121,8 +121,8 @@ private:
   void Join(cSimpleList<cTpsKey> *nlist);
   void Purge(time_t now);
   void GetFirstLast(void);
-//  bool LoadBin(void);
-//  void DecryptBin(const unsigned char *in, unsigned char *out);
+  bool LoadBin(void);
+  void DecryptBin(const unsigned char *in, unsigned char *out);
   cString Time(time_t t);
   bool ProcessAu(const cOpenTVModule *mod);
 protected: