Magellan Linux

Annotation of /trunk/ppp/patches/ppp-2.4.4-maxoctets-2Glimit.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 797 - (hide annotations) (download)
Mon May 11 09:46:04 2009 UTC (15 years, 1 month ago) by niro
File size: 637 byte(s)
-added patches from gentoo

1 niro 797 diff -Nru ppp-2.4.4.orig/pppd/auth.c ppp-2.4.4/pppd/auth.c
2     --- ppp-2.4.4.orig/pppd/auth.c 2006-08-28 19:53:44.000000000 +0300
3     +++ ppp-2.4.4/pppd/auth.c 2006-08-28 20:05:44.028957500 +0300
4     @@ -1164,7 +1164,6 @@
5     check_maxoctets(arg)
6     void *arg;
7     {
8     - int diff;
9     unsigned int used;
10    
11     update_link_stats(ifunit);
12     @@ -1185,8 +1184,7 @@
13     used = link_stats.bytes_in+link_stats.bytes_out;
14     break;
15     }
16     - diff = maxoctets - used;
17     - if(diff < 0) {
18     + if (maxoctets <= used) {
19     notice("Traffic limit reached. Limit: %u Used: %u", maxoctets, used);
20     status = EXIT_TRAFFIC_LIMIT;
21     lcp_close(0, "Traffic limit");