]> www.vanbest.org Git - sasc-ng.git/commitdiff
cardclient-cccam2: fix check cmd send result
authorleslie <unknown>
Tue, 29 Dec 2009 17:47:56 +0000 (18:47 +0100)
committerleslie <unknown>
Tue, 29 Dec 2009 17:47:56 +0000 (18:47 +0100)
systems/cardclient/cccam2.c

index e7249373aa07d0d2795abe6a8a7ba3790179a0ef..fbb725974f39660da7565dfda5921378000b598d 100644 (file)
@@ -644,7 +644,7 @@ void cCardClientCCcam2::PacketAnalyzer(const struct CmdHeader *hdr, int length)
         if(plen>0) {
           static const struct CmdHeader resp = { 0,5,0 };
           LDUMP(L_CC_CCCAM2DT,((struct GenericCmd *)hdr)->payload,plen,"CMD 05 payload");
-          if(CryptSend((unsigned char *)&resp,sizeof(resp))<0)
+          if(!CryptSend((unsigned char *)&resp,sizeof(resp)))
             PRINTF(L_CC_CCCAM2,"failed to send cmd 05 response");
           keymaskpos=60;
           }
@@ -1018,7 +1018,7 @@ void cCardClientCCcam2::Action(void)
       }
     if(lastsend.TimedOut()) {
       static const struct CmdHeader ping = { 0,6,0 };
-      if(CryptSend((unsigned char *)&ping,sizeof(ping))<0)
+      if(!CryptSend((unsigned char *)&ping,sizeof(ping)))
         PRINTF(L_CC_CCCAM2,"failed to send server PING");
       }
     usleep(10);