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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
Description: implicit pointer conversion for HandleArticle
Add a function prototype for HandleArticle() and remove the
existing explicit cast to quiet function pointer conversion
warning which is fatal to the build.
.
implicit pointer conversion xalloc/xrealloc
Perl is using libinn ensure we are including the appropriate headers to
quiet function pointer conversion warning which is fatal to the build.
Author: Andy Whitcroft <apw@ubuntu.com>
Bug-Ubuntu: http://bugs.launchpad.net/bugs/1528545
Index: inn-1.7.2q/innd/innd.h
===================================================================
--- inn-1.7.2q.orig/innd/innd.h
+++ inn-1.7.2q/innd/innd.h
@@ -598,3 +598,11 @@ extern void TCLreadfilter();
extern void TCLsetup();
extern void TCLclose();
#endif /* defined(DO_TCL) */
+
+
+/*
+** PERL Functions
+*/
+#if defined(DO_PERL)
+char *HandleArticle(char *artBody);
+#endif /* defined(DO_PERL) */
Index: inn-1.7.2q/innd/art.c
===================================================================
--- inn-1.7.2q.orig/innd/art.c
+++ inn-1.7.2q/innd/art.c
@@ -1920,7 +1920,7 @@ ARTpost(cp, Replic, ihave)
#if defined(DO_PERL)
pathForPerl = HeaderFind(article->Data, "Path", 4) ;
TMRstart(TMR_PERL);
- if ((perlrc = (char *)HandleArticle(Data.Body)) != NULL) {
+ if ((perlrc = 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);
Index: inn-1.7.2q/nnrpd/nnrpd.h
===================================================================
--- inn-1.7.2q.orig/nnrpd/nnrpd.h
+++ inn-1.7.2q/nnrpd/nnrpd.h
@@ -144,3 +144,10 @@ extern void Reply(char *, ...);
#if defined(VAR_VARARGS)
extern void Reply();
#endif /* defined(VAR_VARARGS) */
+
+/*
+** PERL Functions
+*/
+#if defined(DO_PERL)
+char *HandleHeaders(char *artBody);
+#endif /* defined(DO_PERL) */
Index: inn-1.7.2q/nnrpd/post.c
===================================================================
--- inn-1.7.2q.orig/nnrpd/post.c
+++ inn-1.7.2q/nnrpd/post.c
@@ -896,7 +896,7 @@ ARTpost(article, idbuff)
#if defined(DO_PERL)
/* Calls the Perl subroutine for headers management */
- if ((p = (char *)HandleHeaders(article)) != NULL) {
+ if ((p = HandleHeaders(article)) != NULL) {
if (strncmp(p, "DROP", 4) == 0) {
syslog(L_NOTICE, "%s post %s", ClientHost, p);
return NULL;
Index: inn-1.7.2q/innd/innd.h
===================================================================
--- inn-1.7.2q.orig/innd/innd.h
+++ inn-1.7.2q/innd/innd.h
@@ -605,4 +605,5 @@ extern void TCLclose();
*/
#if defined(DO_PERL)
char *HandleArticle(char *artBody);
+char *HandleMessageID(char *messageID);
#endif /* defined(DO_PERL) */
Index: inn-1.7.2q/innd/nc.c
===================================================================
--- inn-1.7.2q.orig/innd/nc.c
+++ inn-1.7.2q/innd/nc.c
@@ -1589,7 +1589,7 @@ NCcheck(cp)
#if defined(DO_PERL)
/* invoke a perl message filter on the message id */
- else if ((perlrc = (char *)HandleMessageID(p)) != NULL) {
+ else if ((perlrc = HandleMessageID(p)) != NULL) {
cp->Refused++;
(void)sprintf(cp->Sendid.Data, "%d %s", NNTP_ERR_GOTID_VAL, p);
NCwritereply(cp, cp->Sendid.Data);
Index: inn-1.7.2q/nnrpd/perl.c
===================================================================
--- inn-1.7.2q.orig/nnrpd/perl.c
+++ inn-1.7.2q/nnrpd/perl.c
@@ -24,6 +24,7 @@ static void use_rcsid (const char *rid)
#include "post.h"
#include "logging.h"
#include "macros.h"
+#include "nnrpd.h"
#if defined(DO_PERL)
|