Changeset 7232
- Timestamp:
- 08/04/12 12:07:54 (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-stat.c
r7202 r7232 635 635 //cs_debug_mask(D_LB, "loadbalance: resetting ecm count"); 636 636 struct s_reader *rdr; 637 cs_readlock(&readerlist_lock); 637 638 for (rdr=first_active_reader; rdr ; rdr=rdr->next) { 638 639 if (rdr->lb_stat && rdr->client) { … … 646 647 } 647 648 } 649 cs_readunlock(&readerlist_lock); 648 650 } 649 651 … … 1249 1251 int32_t cleaned = 0; 1250 1252 struct s_reader *rdr; 1251 LL_ITER itr = ll_iter_create(configured_readers); 1252 while ((rdr = ll_iter_next(&itr))) { 1253 LL_ITER itr = ll_iter_create(configured_readers); 1254 cs_readlock(&readerlist_lock); //this avoids cleaning a reading during writing 1255 while ((rdr = ll_iter_next(&itr))) { 1253 1256 if (rdr->lb_stat) { 1254 1257 cs_writelock(&rdr->lb_stat_lock); … … 1265 1268 } 1266 1269 } 1270 cs_readunlock(&readerlist_lock); 1267 1271 cs_debug_mask(D_LB, "loadbalancer cleanup: removed %d entries", cleaned); 1268 1272 } … … 1401 1405 q.caid = caidto; 1402 1406 1407 cs_readlock(&readerlist_lock); 1403 1408 for (rdr=first_active_reader; rdr ; rdr=rdr->next) { 1404 1409 if (rdr->lb_stat && rdr->client) { 1405 1410 stat = get_stat(rdr, &q); 1406 if (stat && stat->rc == E_FOUND) 1411 if (stat && stat->rc == E_FOUND) { 1412 cs_readunlock(&readerlist_lock); 1407 1413 return 1; 1408 } 1409 } 1414 } 1415 } 1416 } 1417 cs_readunlock(&readerlist_lock); 1410 1418 return 0; 1411 1419 } -
trunk/oscam-simples.c
r7214 r7232 918 918 } 919 919 920 for (this = cfg.srvid[srvid>>12]; this && (!buf[0]); this = this->next)920 for (this = cfg.srvid[srvid>>12]; this; this = this->next) 921 921 if (this->srvid == srvid) 922 922 for (i=0; i < this->ncaid; i++) -
trunk/oscam.c
r7219 r7232 3779 3779 3780 3780 struct s_reader *rdr = cl->reader; 3781 if (rdr) { 3782 //check for valid reader: 3783 struct s_reader *r; 3784 for (r=first_active_reader; r; r=r->next) 3785 if (r==rdr) break; 3786 if (!r) return; //reader is restarting at this moment 3787 } 3781 3788 3782 3789 switch (cl->typ) {
Note:
See TracChangeset
for help on using the changeset viewer.