Changeset 907
- Timestamp:
- 12/17/09 11:56:44 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cccam-test/module-cccam.c
r906 r907 712 712 static cc_msg_type_t cc_parse_msg(uint8 *buf, int l) 713 713 { 714 cs_log("DEBUG b");715 714 int ret = buf[1]; 716 715 struct cc_data *cc = reader[ridx].cc; 717 718 pthread_mutex_lock(&cc->lock);719 cs_log("DEBUG c");720 716 721 717 switch (buf[1]) { … … 809 805 break; 810 806 case MSG_CW: 811 cs_log("DEBUG e ");807 cs_log("DEBUG e1"); 812 808 cc_cw_decrypt(buf+4); 809 cs_log("DEBUG e2"); 813 810 memcpy(cc->dcw, buf+4, 16); 811 cs_log("DEBUG e3"); 814 812 cs_debug("cccam: cws: %s", cs_hexdump(0, cc->dcw, 16)); 813 cs_log("DEBUG e4"); 815 814 cc_crypt(&cc->block[DECRYPT], buf+4, l-4, ENCRYPT); // additional crypto step 815 cs_log("DEBUG e5"); 816 816 pthread_mutex_unlock(&cc->ecm_busy); 817 817 //cc_abort_user_ecms(); 818 cs_log("DEBUG e6"); 818 819 cc_send_ecm(NULL, NULL); 820 cs_log("DEBUG e7"); 819 821 ret = 0; 820 822 break; … … 826 828 } 827 829 828 cs_log("DEBUG d");829 pthread_mutex_unlock(&cc->lock);830 830 return ret; 831 831 } … … 856 856 memcpy(cbuf, buf, l); // make a copy of buf 857 857 858 pthread_mutex_lock(&cc->lock); 859 858 860 if (!is_server) { 859 861 if (!client[cs_idx].udp_fd) return(-1); … … 879 881 880 882 X_FREE(cbuf); 883 884 pthread_mutex_unlock(&cc->lock); 881 885 882 886 return(n);
Note:
See TracChangeset
for help on using the changeset viewer.