aboutsummaryrefslogtreecommitdiff
path: root/gacopyz
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-11-28 11:24:59 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-11-28 11:24:59 +0000
commit9227c36e0370e37217b26c22a7644e1c12de7188 (patch)
tree2117da98a4ace6bd34e3baaf605ee97458171445 /gacopyz
parented4935d2c5fb3319f835e860a45f40d1251c00bd (diff)
downloadmailfromd-9227c36e0370e37217b26c22a7644e1c12de7188.tar.gz
mailfromd-9227c36e0370e37217b26c22a7644e1c12de7188.tar.bz2
Add const qualifiers to gacopyz_getsymval, gacopyz_replace_body and
derived functions. git-svn-id: file:///svnroot/mailfromd/trunk@1765 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'gacopyz')
-rw-r--r--gacopyz/context.c4
-rw-r--r--gacopyz/gacopyz.c4
-rw-r--r--gacopyz/gacopyz.h7
3 files changed, 8 insertions, 7 deletions
diff --git a/gacopyz/context.c b/gacopyz/context.c
index 8199eb03..41d64c44 100644
--- a/gacopyz/context.c
+++ b/gacopyz/context.c
@@ -33,8 +33,8 @@ gacopyz_getpriv (SMFICTX *ctx)
return ctx->privdata;
}
-char *
-gacopyz_getsymval(SMFICTX *ctx, char *name)
+const char *
+gacopyz_getsymval(SMFICTX *ctx, const char *name)
{
int i;
int len;
diff --git a/gacopyz/gacopyz.c b/gacopyz/gacopyz.c
index 39c78a9c..02c833e9 100644
--- a/gacopyz/gacopyz.c
+++ b/gacopyz/gacopyz.c
@@ -595,7 +595,7 @@ ctx_read(SMFICTX *ctx, char *buf, size_t size)
}
static int
-ctx_write(SMFICTX *ctx, char *buf, size_t size)
+ctx_write(SMFICTX *ctx, const char *buf, size_t size)
{
int rc = MI_SUCCESS;
@@ -1791,7 +1791,7 @@ gacopyz_del_rcpt(SMFICTX *ctx, const char *rcpt)
#define GACOPYZ_CHUNK_SIZE 65535
int
-gacopyz_replace_body(SMFICTX *ctx, unsigned char *bodyp, size_t bodylen)
+gacopyz_replace_body(SMFICTX *ctx, const unsigned char *bodyp, size_t bodylen)
{
union header *hptr;
char buf[sizeof hptr->buf + GACOPYZ_CHUNK_SIZE];
diff --git a/gacopyz/gacopyz.h b/gacopyz/gacopyz.h
index 928d960a..706a9c87 100644
--- a/gacopyz/gacopyz.h
+++ b/gacopyz/gacopyz.h
@@ -224,7 +224,7 @@ extern int smfi_settimeout (time_t);
extern int smfi_setconn (char *);
extern int smfi_stop (void);
-#define smfi_getsymval gacopyz_getsymval
+#define smfi_getsymval(ctx,s) ((char*) gacopyz_getsymval(ctx, (char*)s))
int smfi_addheader (SMFICTX *, char *, char *);
int smfi_chgheader (SMFICTX *, char *, int, char *);
@@ -278,7 +278,7 @@ void gacopyz_cleanup_children(gacopyz_conn_t conn);
void gacopyz_cleanup_conn(gacopyz_conn_t conn);
void gacopyz_setup_signals(void);
-char *gacopyz_getsymval (SMFICTX *, char *);
+const char *gacopyz_getsymval (SMFICTX *, const char *);
int gacopyz_setreply(SMFICTX *ctx, const char *rcode, const char *xcode,
const char *message);
@@ -298,7 +298,8 @@ int gacopyz_change_header(SMFICTX *ctx, int index, const char *headerf,
const char *headerv);
int gacopyz_add_rcpt(SMFICTX *ctx, const char *rcpt);
int gacopyz_del_rcpt(SMFICTX *ctx, const char *rcpt);
-int gacopyz_replace_body(SMFICTX *ctx, unsigned char *bodyp, size_t bodylen);
+int gacopyz_replace_body(SMFICTX *ctx, const unsigned char *bodyp,
+ size_t bodylen);
int gacopyz_progress(SMFICTX *ctx);
int gacopyz_quarantine(SMFICTX *ctx, const char *reason);

Return to:

Send suggestions and report system problems to the System administrator.