diff options
Diffstat (limited to 'src/qmail-smtpam.c')
-rw-r--r-- | src/qmail-smtpam.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/qmail-smtpam.c b/src/qmail-smtpam.c index 46f47a0..9ef1238 100644 --- a/src/qmail-smtpam.c +++ b/src/qmail-smtpam.c @@ -96,7 +96,7 @@ void out(char *s) if (buffer_puts(buffer_1small, s) == -1) _exit(111); } -void zero() +static void zero() { if (buffer_put(buffer_1small, "\0", 1) == -1) _exit(111); } @@ -120,7 +120,7 @@ void outsafe(stralloc *sa) } } -void temp_noip() +static void temp_noip() { out("Zinvalid ipaddr in control/domainips (#4.3.0)\n"); zerodie(); @@ -132,13 +132,13 @@ void temp_nomem() zerodie(); } -void temp_oserr() +static void temp_oserr() { out("ZSystem resources temporarily unavailable. (#4.3.0)\n"); zerodie(); } -void temp_osip() +static void temp_osip() { out("ZCan't bind to local ip address: "); outsafe(&sendip); @@ -146,13 +146,13 @@ void temp_osip() zerodie(); } -void temp_noconn() +static void temp_noconn() { out("ZSorry, I wasn't able to establish an SMTP connection. (#4.4.1)\n"); zerodie(); } -void temp_dnscanon() +static void temp_dnscanon() { out("ZCNAME lookup failed temporarily for: "); outsafe(&canonhost); @@ -160,7 +160,7 @@ void temp_dnscanon() zerodie(); } -void temp_dns() +static void temp_dns() { out("ZSorry, I couldn't find any host named: "); outsafe(&host); @@ -168,25 +168,25 @@ void temp_dns() zerodie(); } -void temp_chdir() +static void temp_chdir() { out("ZUnable to switch to home directory. (#4.3.0)\n"); zerodie(); } -void temp_control() +static void temp_control() { out("ZUnable to read control files. (#4.3.0)\n"); zerodie(); } -void perm_usage() +static void perm_usage() { out("Dqmail-smtpam was invoked improperly. (#5.3.5)\n"); zerodie(); } -void perm_dns() +static void perm_dns() { out("DSorry, I couldn't find any host named: "); outsafe(&host); @@ -194,7 +194,7 @@ void perm_dns() zerodie(); } -void outhost() +static void outhost() { char ipaddr[IPFMT]; int len; @@ -208,7 +208,7 @@ void outhost() int flagcritical = 0; -void dropped() +static void dropped() { out("ZConnected to "); outhost(); @@ -222,7 +222,7 @@ long timeoutconnect = 60; int smtpfd; long timeout = 1200; -ssize_t saferead(int fd, char *buf, int len) +static ssize_t saferead(int fd, char *buf, int len) { int r; r = timeoutread(timeout, smtpfd, buf, len); @@ -230,7 +230,7 @@ ssize_t saferead(int fd, char *buf, int len) return r; } -ssize_t safewrite(int fd, char *buf, int len) +static ssize_t safewrite(int fd, char *buf, int len) { int r; r = timeoutwrite(timeout, smtpfd, buf, len); @@ -245,7 +245,7 @@ buffer bi = BUFFER_INIT(saferead, -1, frombuf, sizeof(frombuf)); stralloc smtptext = {0}; -void get(char *ch) +static void get(char *ch) { buffer_get(&bi, ch, 1); if (*ch != '\r') @@ -253,7 +253,7 @@ void get(char *ch) if (!stralloc_append(&smtptext, ch)) temp_nomem(); } -unsigned long smtpcode() +static unsigned long smtpcode() { unsigned char ch; unsigned long code; @@ -279,7 +279,7 @@ unsigned long smtpcode() return code; } -void outsmtptext() +static void outsmtptext() { int i; if (smtptext.s) { @@ -293,7 +293,7 @@ void outsmtptext() } } -void quit(char *prepend, char *append) +static void quit(char *prepend, char *append) { buffer_putsflush(&bo, "QUIT\r\n"); /* waiting for remote side is just too ridiculous */ @@ -326,7 +326,7 @@ stralloc tlsdestinations = {0}; struct constmap maptlsdestinations; unsigned long verifydepth = VERIFYDEPTH; -void tls_init() +static void tls_init() { /* Client CTX */ @@ -357,7 +357,7 @@ void tls_init() if (tls_timeoutconn(timeout, smtpfd, smtpfd, ssl) <= 0) temp_tlserr(); } -int starttls_peer() +static int starttls_peer() { int i = 0; @@ -368,7 +368,7 @@ int starttls_peer() return 0; } -void tls_peercheck() +static void tls_peercheck() { X509 *cert; @@ -404,7 +404,7 @@ void tls_peercheck() return; } -int utf8flag(unsigned char *ch, int len) +static int utf8flag(unsigned char *ch, int len) { int i = 0; while (i < len) @@ -416,7 +416,7 @@ int utf8flag(unsigned char *ch, int len) unsigned long code; -void smtp_greeting() +static void smtp_greeting() { buffer_puts(&bo, "EHLO "); buffer_put(&bo, helohost.s, helohost.len); @@ -434,7 +434,7 @@ void smtp_greeting() } } -void smtp_starttls() +static void smtp_starttls() { buffer_puts(&bo, "STARTTLS\r\n"); buffer_flush(&bo); @@ -448,7 +448,7 @@ void smtp_starttls() } } -void smtp() +static void smtp() { if (flagtls > 10 && flagtls < 20) { /* SMTPS */ @@ -490,7 +490,7 @@ void smtp() _exit(1); } -void getcontrols() +static void getcontrols() { if (control_init() == -1) temp_control(); if (control_readint(&timeout, "control/timeoutremote") == -1) temp_control(); |