Changeset 4749 for trunk/module-cccam.c
- Timestamp:
- 02/25/11 11:26:16 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-cccam.c
r4747 r4749 478 478 } 479 479 480 pthread_mutex_lock(&cc->lockcmd); 481 480 482 cc_crypt(&cc->block[DECRYPT], buf, 4, DECRYPT); 481 483 //cs_ddump_mask(D_CLIENT, buf, 4, "cccam: decrypted header:"); … … 486 488 if (size) { // check if any data is expected in msg 487 489 if (size > maxlen) { 490 pthread_mutex_unlock(&cc->lockcmd); 488 491 cs_debug_mask(cl->typ=='c'?D_CLIENT:D_READER, "%s message too big (size=%d max=%d)", getprefix(), size, maxlen); 489 492 return 0; … … 495 498 496 499 if (len != size) { 500 pthread_mutex_unlock(&cc->lockcmd); 497 501 if (len <= 0) 498 502 cs_debug_mask(cl->typ=='c'?D_CLIENT:D_READER, "%s disconnected by remote", getprefix()); … … 506 510 len += 4; 507 511 } 512 513 pthread_mutex_unlock(&cc->lockcmd); 508 514 509 515 //cs_ddump_mask(cl->typ=='c'?D_CLIENT:D_READER, buf, len, "cccam: full decrypted msg, len=%d:", len); … … 526 532 struct cc_data *cc = cl->cc; 527 533 534 pthread_mutex_lock(&cc->lockcmd); //We need this because cc_cmd_send is called from cccshare 535 528 536 memset(netbuf, 0, len + 4); 529 537 … … 548 556 rdr->last_s = time(NULL); 549 557 558 pthread_mutex_unlock(&cc->lockcmd); 559 550 560 if (n != len) { 551 561 if (rdr) … … 1400 1410 pthread_mutex_unlock(&cc->lock); 1401 1411 pthread_mutex_destroy(&cc->lock); 1412 1413 pthread_mutex_unlock(&cc->lockcmd); 1414 pthread_mutex_destroy(&cc->lockcmd); 1402 1415 1403 1416 pthread_mutex_unlock(&cc->ecm_busy); … … 2430 2443 void cc_init_cc(struct cc_data *cc) { 2431 2444 pthread_mutex_init(&cc->lock, NULL); //No recursive lock 2445 pthread_mutex_init(&cc->lockcmd, NULL); //No recursive lock 2432 2446 pthread_mutex_init(&cc->ecm_busy, NULL); //No recusive lock 2433 2447 pthread_mutex_init(&cc->cards_busy, NULL); //No (more) recursive lock … … 2725 2739 rdr->card_status = CARD_FAILURE; 2726 2740 2727 if (cc && cc->mode != CCCAM_MODE_NOTINIT)2741 if (cc && cc->mode == CCCAM_MODE_SHUTDOWN) 2728 2742 return -99; 2729 2743
Note:
See TracChangeset
for help on using the changeset viewer.