diff src/spamass.h @ 214:82886d4dd71f stable-6-0-19

Fixes to compile on Fedora 9 and for const correctness.
author Carl Byington <carl@five-ten-sg.com>
date Tue, 10 Jun 2008 08:58:42 -0700
parents a4d313c2460b
children 78eedbbce636
line wrap: on
line diff
--- a/src/spamass.h	Wed Apr 30 13:11:32 2008 -0700
+++ b/src/spamass.h	Tue Jun 10 08:58:42 2008 -0700
@@ -21,21 +21,21 @@
 
 #include <list>
 
-extern char *spamc;
-extern char *spamc_empty;
+extern const char *spamc;
+extern const char *spamc_empty;
 using namespace std;
 
 class mlfiPriv;
 
 class SpamAssassin {
 public:
-	SpamAssassin(mlfiPriv *priv_, int ip, char *helo_, char *from, char *qid);
+    SpamAssassin(mlfiPriv *priv_, int ip, const char *helo_, const char *from, const char *qid);
 	~SpamAssassin();
 
-	void mlfi_envrcpt(SMFICTX *ctx, char *envrcpt);
-	void mlfi_header(char* headerf, char* headerv);
+    void mlfi_envrcpt(SMFICTX *ctx, const char *envrcpt);
+    void mlfi_header(const char* headerf, const char* headerv);
 	void mlfi_eoh();
-	void mlfi_body(u_char *bodyp, size_t bodylen);
+    void mlfi_body(const u_char *bodyp, size_t bodylen);
 	int  mlfi_eom();
 
 private:
@@ -48,8 +48,8 @@
 	int  read_pipe();
 	void empty_and_close_pipe();
 	void closeall(int fd);
-	char *getorwarnmacro(SMFICTX *ctx, char *macro, char *def, char *scope);
-	void warnmacro(char *macro, char *scope);
+    const char *getorwarnmacro(SMFICTX *ctx, const char *macro, const char *def, const char *scope);
+    void warnmacro(const char *macro, const char *scope);
 
 public:
 	bool error; 			// spamc died or cannot work
@@ -61,9 +61,9 @@
 	int 	 ip4;		// ip4 address of smtp client
 
 	// strings owned by main dnsbl
-	char *helo; 		// client helo value
-	char *envfrom;		// envelope from value for this message
-	char *queueid;		// the sendmail queue id for this message
+    const char *helo;       // client helo value
+    const char *envfrom;    // envelope from value for this message
+    const char *queueid;    // the sendmail queue id for this message
 
 	// Process handling variables
 	pid_t pid;