File: 2_perl_timer

package info (click to toggle)
inn 1%3A1.7.2q-46
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 5,628 kB
  • sloc: ansic: 35,534; perl: 11,934; sh: 4,029; makefile: 1,982; awk: 1,567; yacc: 684; tcl: 85; csh: 70
file content (43 lines) | stat: -rw-r--r-- 1,655 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
diff -ruN inn-1.7.2.orig/innd/art.c inn-1.7.2/innd/art.c
--- inn-1.7.2.orig/innd/art.c	2003-07-06 14:34:10.000000000 +0200
+++ inn-1.7.2/innd/art.c	2003-07-06 14:32:05.000000000 +0200
@@ -1856,7 +1856,9 @@
 
 #if defined(DO_PERL)
     pathForPerl = HeaderFind(article->Data, "Path", 4) ;
+    TMRstart(TMR_PERL);
     if ((perlrc = (char *)HandleArticle(Data.Body)) != NULL) {
+	TMRstop(TMR_PERL);
         (void)sprintf(buff, "%d %s", NNTP_REJECTIT_VAL, perlrc);
         syslog(L_NOTICE, "rejecting[perl] %s %s", HDR(_message_id), buff);
         ARTlog(&Data, ART_REJECT, buff);
@@ -1868,6 +1870,7 @@
         ARTreject(buff, article);
         return buff;
     }
+    TMRstop(TMR_PERL);
 #endif /* DO_PERL */
 
     /* I suppose some masochist will run with both TCP and PERL in together */
diff -ruN inn-1.7.2.orig/innd/timer.c inn-1.7.2/innd/timer.c
--- inn-1.7.2.orig/innd/timer.c	2003-07-06 14:34:08.000000000 +0200
+++ inn-1.7.2/innd/timer.c	2003-07-06 14:28:03.000000000 +0200
@@ -101,6 +101,7 @@
 			case TMR_ARTCNCL:	str = "artcncl";  break;
 			case TMR_HISHAVE:	str = "hishave";  break;
 			case TMR_HISGREP:	str = "hisgrep";  break;
+			case TMR_PERL:		str = "perl";  break;
 		}
 		sprintf(buf, "%s %d(%d) ", str, cumulative[i], count[i]);
 		cumulative[i] = count[i] = 0;
diff -ruN inn-1.7.2.orig/innd/timer.h inn-1.7.2/innd/timer.h
--- inn-1.7.2.orig/innd/timer.h	2003-07-06 14:34:08.000000000 +0200
+++ inn-1.7.2/innd/timer.h	2003-07-06 14:28:27.000000000 +0200
@@ -12,6 +12,7 @@
 #define		TMR_ARTCNCL		7
 #define		TMR_HISHAVE		8
 #define		TMR_HISGREP		9
+#define		TMR_PERL		10
 
 extern void TMRinit();
 extern int TMRmainloophook();