Changeset 870
- Timestamp:
- 12/17/09 07:46:32 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-cccam.c
r866 r870 226 226 227 227 pthread_mutex_t lock; 228 pthread_mutex_t ecm_busy; 228 229 }; 229 230 … … 536 537 if (!cc) return 0; 537 538 539 pthread_mutex_lock(&cc->ecm_busy); 538 540 pthread_mutex_lock(&cc->lock); 539 541 540 //if (cc->processing) return 0;541 542 542 if ((n = cc_get_nxt_ecm()) < 0) { 543 pthread_mutex_unlock(&cc->ecm_busy); 543 544 pthread_mutex_unlock(&cc->lock); 544 545 return 0; // no queued ecms … … 546 547 cur_er = &ecmtask[n]; 547 548 if (cur_er->rc == 99) { 549 pthread_mutex_unlock(&cc->ecm_busy); 548 550 pthread_mutex_unlock(&cc->lock); 549 551 return 0; // ecm already sent … … 615 617 616 618 X_FREE(ecmbuf); 617 cc->processing = 1;618 619 } else { 619 620 n = -1; … … 742 743 case MSG_CW_NOK1: 743 744 case MSG_CW_NOK2: 744 cc->processing = 0;745 pthread_mutex_unlock(&cc->ecm_busy); 745 746 cs_log("cccam: cw nok, sid = %x", cc->cur_sid); 746 747 … … 769 770 break; 770 771 case MSG_CW: 771 cc->processing = 0;772 pthread_mutex_unlock(&cc->ecm_busy); 772 773 cc_cw_decrypt(buf+4); 773 774 memcpy(cc->dcw, buf+4, 16); … … 928 929 929 930 pthread_mutex_init(&cc->lock, NULL); 930 cc->processing = 0;931 pthread_mutex_init(&cc->ecm_busy, NULL); 931 932 932 933 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.