~ubuntu-branches/ubuntu/saucy/haproxy/saucy

« back to all changes in this revision

Viewing changes to src/freq_ctr.c

  • Committer: Package Import Robot
  • Author(s): Vincent Bernat, Apollon Oikonomopoulos, Vincent Bernat, Prach Pongpanich
  • Date: 2013-05-06 20:02:14 UTC
  • mfrom: (1.1.13) (14.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20130506200214-21m58va04oazl7ot
Tags: 1.4.23-1
[ Apollon Oikonomopoulos ]
* New upstream version (Closes: #643650, #678953)
   + This fixes CVE-2012-2942 (Closes: #674447)
   + This fixes CVE-2013-1912 (Closes: #704611)
* Ship vim addon as vim-haproxy (Closes: #702893)
* Check for the configuration file after sourcing /etc/default/haproxy
  (Closes: #641762)
* Use /dev/log for logging by default (Closes: #649085)

[ Vincent Bernat ]
* debian/control:
   + add Vcs-* fields
   + switch maintenance to Debian HAProxy team. (Closes: #706890)
   + drop dependency to quilt: 3.0 (quilt) format is in use.
* debian/rules:
   + don't explicitly call dh_installchangelog.
   + use dh_installdirs to install directories.
   + use dh_install to install error and configuration files.
   + switch to `linux2628` Makefile target for Linux.
* debian/postrm:
   + remove haproxy user and group on purge.
* Ship a more minimal haproxy.cfg file: no `listen` blocks but `global`
  and `defaults` block with appropriate configuration to use chroot and
  logging in the expected way.

[ Prach Pongpanich ]
* debian/copyright:
   + add missing copyright holders
   + update years of copyright
* debian/rules:
   + build with -Wl,--as-needed to get rid of unnecessary depends
* Remove useless files in debian/haproxy.{docs,examples}
* Update debian/watch file, thanks to Bart Martens

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
        if (past <= 1 && !curr)
48
48
                return past; /* very low rate, avoid flapping */
49
49
 
50
 
        return curr + mul32hi(past, ~curr_sec_ms_scaled);
 
50
        return curr + mul32hi(past, ms_left_scaled);
51
51
}
52
52
 
53
53
/* returns the number of remaining events that can occur on this freq counter
59
59
        unsigned int curr, past;
60
60
        unsigned int age;
61
61
 
62
 
        past = 0;
63
62
        curr = 0;               
64
63
        age = now.tv_sec - ctr->curr_sec;
65
64
 
69
68
                        curr = past;
70
69
                        past = ctr->prev_ctr;
71
70
                }
72
 
                curr += mul32hi(past, ~curr_sec_ms_scaled);
 
71
                curr += mul32hi(past, ms_left_scaled);
73
72
        }
74
73
        curr += pend;
75
74
 
99
98
                        curr = past;
100
99
                        past = ctr->prev_ctr;
101
100
                }
102
 
                curr += mul32hi(past, ~curr_sec_ms_scaled);
 
101
                curr += mul32hi(past, ms_left_scaled);
103
102
        }
104
103
        curr += pend;
105
104