diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1998-10-26 19:57:45 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1998-10-26 19:57:45 +0000 |
commit | 836bbce0c428581f40d13d8c3d27d1c7adc31ccb (patch) | |
tree | 3d03fdd0b5bdda66ef27bf852cac646968968882 /sink.c | |
parent | bcc60aebf68fd7839c708a623048636a03f05043 (diff) | |
download | fetchmail-836bbce0c428581f40d13d8c3d27d1c7adc31ccb.tar.gz fetchmail-836bbce0c428581f40d13d8c3d27d1c7adc31ccb.tar.bz2 fetchmail-836bbce0c428581f40d13d8c3d27d1c7adc31ccb.zip |
Jonathan T. Agnew's massive code cleanup.
svn path=/trunk/; revision=2137
Diffstat (limited to 'sink.c')
-rw-r--r-- | sink.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -73,7 +73,7 @@ static int smtp_open(struct query *ctl) * What it will affect is the listener's logging. */ struct idlist *idp; - char *id_me = run.invisible ? ctl->server.truename : fetchmailhost; + const char *id_me = run.invisible ? ctl->server.truename : fetchmailhost; int oldphase = phase; errno = 0; @@ -159,7 +159,7 @@ static int smtp_open(struct query *ctl) /* these are shared by open_sink and stuffline */ static FILE *sinkfp; -static RETSIGTYPE (*sigchld)(); +static RETSIGTYPE (*sigchld)(int); int stuffline(struct query *ctl, char *buf) /* ship a line to the given control block's output sink (SMTP server or MDA) */ @@ -235,7 +235,7 @@ int stuffline(struct query *ctl, char *buf) static void sanitize(char *s) /* replace unsafe shellchars by an _ */ { - static char *ok_chars = " 1234567890!@%-_=+:,./abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + const static char *ok_chars = " 1234567890!@%-_=+:,./abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; char *cp; for (cp = s; *(cp += strspn(cp, ok_chars)); /* NO INCREMENT */) @@ -243,7 +243,7 @@ static void sanitize(char *s) } int open_sink(struct query *ctl, - char *return_path, + const char *return_path, struct idlist *xmit_names, long reallen, int *good_addresses, int *bad_addresses) @@ -401,7 +401,8 @@ int open_sink(struct query *ctl, } else { - char *ap, options[MSGBUFSIZE], addr[128]; + const char *ap; + char options[MSGBUFSIZE], addr[128]; /* build a connection to the SMTP listener */ if ((smtp_open(ctl) == -1)) @@ -559,7 +560,7 @@ int open_sink(struct query *ctl, { error(0, 0, "can't even send to %s!", run.postmaster); SMTP_rset(ctl->smtp_socket); /* required by RFC1870 */ - return(PS_REFUSED); + return(PS_SMTP); } } |