Changeset 6563
- Timestamp:
- 03/21/12 18:07:53 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-stat.c
r6557 r6563 202 202 } 203 203 204 static uint16_t get_ecmpid( uint16_t caid, uint16_t ecmpid)205 { 206 if ( (caid>>8) == 0x01) // 0x0100 seca204 static uint16_t get_ecmpid(struct s_reader *rdr, uint16_t caid, uint16_t ecmpid) 205 { 206 if (!(rdr->typ & R_IS_NETWORK) && (caid>>8 == 0x01)) // tryfix for seca network readers not sending correct ecmpid but a random one causing high cpuload 207 207 return ecmpid; 208 208 return 0; … … 253 253 254 254 prid = get_prid(caid, prid); 255 ecmpid = get_ecmpid( caid, ecmpid);255 ecmpid = get_ecmpid(rdr, caid, ecmpid); 256 256 257 257 if (lock) cs_readlock(&rdr->lb_stat_lock); … … 262 262 while ((stat = ll_iter_next(&it))) { 263 263 i++; 264 if (stat->caid==caid && stat->prid==prid && stat->ecmpid==ecmpid&& stat->srvid==srvid && stat->chid==chid) {264 if (stat->caid==caid && stat->prid==prid && (stat->ecmpid==ecmpid || ecmpid==0x0000) && stat->srvid==srvid && stat->chid==chid) { 265 265 if (stat->ecmlen == ecmlen) 266 266 break; … … 300 300 301 301 prid = get_prid(caid, prid); 302 ecmpid = get_ecmpid( caid, ecmpid);302 ecmpid = get_ecmpid(rdr, caid, ecmpid); 303 303 304 304 cs_writelock(&rdr->lb_stat_lock); … … 307 307 READER_STAT *stat; 308 308 while ((stat = ll_iter_next(&it))) { 309 if (stat->caid==caid && stat->prid==prid && stat->ecmpid == ecmpid&& stat->srvid==srvid && stat->chid==chid) {309 if (stat->caid==caid && stat->prid==prid && (stat->ecmpid==ecmpid || ecmpid==0x0000) && stat->srvid==srvid && stat->chid==chid) { 310 310 if (!stat->ecmlen || stat->ecmlen == ecmlen) { 311 311 ll_iter_remove_data(&it); … … 431 431 432 432 uint32_t prid = get_prid(er->caid, er->prid); 433 uint16_t pid = get_ecmpid( er->caid, er->pid);433 uint16_t pid = get_ecmpid(rdr, er->caid, er->pid); 434 434 435 435 cs_writelock(&rdr->lb_stat_lock); … … 492 492 // -2 = causes loadbalancer to block if happens too often 493 493 494 if (rdr->typ & R_IS_NETWORK) // tryfix for network readers not sending correct ecmpid but a random one causing high cpuload495 er->pid = 0x0000;496 494 497 495 if (rc == E_NOTFOUND && (uint32_t)ecm_time >= cfg.ctimeout) //Map "not found" to "timeout" if ecm_time>client time out … … 703 701 704 702 provid = get_prid(caid, provid); 705 ecmpid = get_ecmpid( caid, ecmpid);703 ecmpid = get_ecmpid(rdr, caid, ecmpid); 706 704 707 705 cs_writelock(&rdr->lb_stat_lock); … … 711 709 if (stat->caid == caid && 712 710 stat->prid == provid && 713 stat->ecmpid == ecmpid&&711 (stat->ecmpid==ecmpid || ecmpid == 0x0000) && 714 712 stat->srvid == sid && 715 713 stat->chid == cid &&
Note:
See TracChangeset
for help on using the changeset viewer.