Changeset 5129 for trunk/module-stat.c
- Timestamp:
- 04/30/11 13:35:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-stat.c
r5128 r5129 637 637 ushort caid_to = get_betatunnel_caid_to(er->caid); 638 638 if (caid_to) { 639 int needs_stats_nagra , needs_stats_beta = 0;639 int needs_stats_nagra = 0, needs_stats_beta = 0; 640 640 641 641 int32_t time_nagra = 0; … … 657 657 658 658 if (stat_nagra && stat_nagra->rc == 0) { 659 time = stat_nagra->time_avg /weight;659 time = stat_nagra->time_avg*100/weight; 660 660 if (!time_nagra || time < time_nagra) 661 661 time_nagra = time; … … 663 663 664 664 if (stat_beta && stat_beta->rc == 0) { 665 time = stat_beta->time_avg /weight;665 time = stat_beta->time_avg*100/weight; 666 666 if (!time_beta || time < time_beta) 667 667 time_beta = time; … … 683 683 } 684 684 else if (time_beta && (!time_nagra || time_beta <= time_nagra)) { 685 cs_debug_mask(D_TRACE, "loadbalancer-betatunnel %04X:%04X selected beta: n%dms >b%dms", er->caid, caid_to, time_nagra, time_beta);685 cs_debug_mask(D_TRACE, "loadbalancer-betatunnel %04X:%04X selected beta: n%dms > b%dms", er->caid, caid_to, time_nagra, time_beta); 686 686 convert_to_beta_int(er, caid_to); 687 687 } 688 688 else { 689 cs_debug_mask(D_TRACE, "loadbalancer-betatunnel %04X:%04X selected nagra: n%dms <b%dms", er->caid, caid_to, time_nagra, time_beta);689 cs_debug_mask(D_TRACE, "loadbalancer-betatunnel %04X:%04X selected nagra: n%dms < b%dms", er->caid, caid_to, time_nagra, time_beta); 690 690 } 691 691 // else nagra is faster or no beta, so continue unmodified … … 703 703 READER_STAT *stat = NULL; 704 704 int32_t retrylimit = get_retrylimit(er); 705 705 706 int32_t new_stats = 0; 706 707 int32_t nlocal_readers = 0; 707 708 int32_t nbest_readers = get_nbest_readers(er); … … 758 759 ll_append(result, rdr); //no statistics, this reader is active (now) but we need statistics first! 759 760 nreaders--; 761 new_stats = 1; 760 762 continue; 761 763 } … … 775 777 ll_append(result, rdr); //need more statistics! 776 778 nreaders--; 779 new_stats = 1; 777 780 continue; 778 781 } … … 901 904 ll_destroy(timeout_services); 902 905 903 if ( ll_count(result) < ll_count(er->matching_rdr)) {906 if (!new_stats && ll_count(result) < ll_count(er->matching_rdr)) { 904 907 if (!n) //no best reader found? reopen if we have ecm_count>0 905 908 {
Note:
See TracChangeset
for help on using the changeset viewer.