add common functions for the new config file format
[openwrt.git] / openwrt / package / pptpd / patches / pptpgre-use-debug-option.patch
1 diff -Nur pptpd-1.3.0/pptpgre.c.orig pptpd-1.3.0/pptpgre.c
2 --- pptpd-1.3.0/pptpgre.c.orig 2006-04-18 02:13:10.000000000 -0400
3 +++ pptpd-1.3.0/pptpgre.c 2006-04-18 02:14:19.000000000 -0400
4 @@ -46,6 +46,9 @@
5
6 #define PACKET_MAX 8196
7
8 +/* Command Line Variable Args */
9 +extern int pptpctrl_debug;
10 +
11 typedef int (*callback_t)(int cl, void *pack, unsigned int len);
12
13 /* test for a 32 bit counter overflow */
14 @@ -319,7 +322,9 @@
15 stats.rx_lost += head->seq - gre.seq_recv - 1;
16 syslog(LOG_DEBUG, "GRE: timeout waiting for %d packets", head->seq - gre.seq_recv - 1);
17 }
18 - syslog(LOG_DEBUG, "GRE: accepting #%d from queue", head->seq);
19 + if (pptpctrl_debug) {
20 + syslog(LOG_DEBUG, "GRE: accepting #%d from queue", head->seq);
21 + }
22 gre.seq_recv = head->seq;
23 status = callback(cl, head->packet, head->packlen);
24 pqueue_del(head);
25 @@ -399,7 +404,9 @@
26 }
27 /* check for out-of-order sequence number */
28 if (seq_greater(seq, gre.seq_recv)) {
29 - syslog(LOG_DEBUG, "GRE: accepting packet #%d", seq);
30 + if (pptpctrl_debug) {
31 + syslog(LOG_DEBUG, "GRE: accepting packet #%d", seq);
32 + }
33 stats.rx_accepted++;
34 gre.seq_recv = seq;
35 return cb(cl, buffer + ip_len + headersize, payload_len);
This page took 0.049846 seconds and 5 git commands to generate.