Changeset 5186 for trunk/module-cccam.c
- Timestamp:
- 05/06/11 14:36:56 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-cccam.c
r5175 r5186 264 264 265 265 struct cc_srvid *srvid = cs_malloc(&srvid, sizeof(struct cc_srvid), QUITERROR); 266 *srvid = *srvid_blocked;266 memcpy(srvid, srvid_blocked, sizeof(struct cc_srvid)); 267 267 ll_append(card->badsids, srvid); 268 268 cs_debug_mask(D_READER, "%s added sid block %04X(%d) for card %08x", … … 470 470 return -1; 471 471 472 while ( pthread_mutex_trylock(&cc->lockcmd)) {472 while (cl->cc && cc->mode != CCCAM_MODE_SHUTDOWN && pthread_mutex_trylock(&cc->lockcmd)) { 473 473 cs_debug_mask(D_TRACE, "%s trylock recv waiting", getprefix()); 474 474 cs_sleepms(50); 475 475 } 476 if (!cl->cc || cc->mode == CCCAM_MODE_SHUTDOWN) return -1; 476 477 477 478 len = recv(handle, buf, 4, MSG_WAITALL); … … 540 541 struct cc_data *cc = cl->cc; 541 542 542 while ( pthread_mutex_trylock(&cc->lockcmd)) { //We need this because cc_cmd_send is called from cccshare543 while (cl->cc && cc->mode != CCCAM_MODE_SHUTDOWN && pthread_mutex_trylock(&cc->lockcmd)) { //We need this because cc_cmd_send is called from cccshare 543 544 cs_debug_mask(D_TRACE, "%s trylock send waiting", getprefix()); 544 545 cs_sleepms(50); 545 546 } 547 if (!cl->cc || cc->mode == CCCAM_MODE_SHUTDOWN) return -1; 546 548 547 549 if (cmd == MSG_NO_HEADER) { … … 1479 1481 cc->mode = CCCAM_MODE_SHUTDOWN; 1480 1482 1483 cl->cc=NULL; 1484 1481 1485 while (pthread_mutex_trylock(&cc->lockcmd)) cs_sleepms(110); 1482 1486 pthread_mutex_trylock(&cc->ecm_busy); 1483 1487 pthread_mutex_trylock(&cc->cards_busy); 1484 1485 cl->cc=NULL;1486 1488 1487 1489 cs_debug_mask(D_TRACE, "exit cccam1/3");
Note:
See TracChangeset
for help on using the changeset viewer.