diff options
author | rsc <devnull@localhost> | 2006-02-12 00:34:08 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-02-12 00:34:08 +0000 |
commit | a79cd7832f0154b7099bdeda5f9fbff6402d6760 (patch) | |
tree | 96ee47d45125d551f535d94256cbfcb323a23295 /src/cmd/upas/smtp | |
parent | 7e61af5124e3843a8934da4e6be5e8fdc58d99dd (diff) | |
download | plan9port-a79cd7832f0154b7099bdeda5f9fbff6402d6760.tar.gz plan9port-a79cd7832f0154b7099bdeda5f9fbff6402d6760.tar.bz2 plan9port-a79cd7832f0154b7099bdeda5f9fbff6402d6760.zip |
more changes
Diffstat (limited to 'src/cmd/upas/smtp')
-rw-r--r-- | src/cmd/upas/smtp/mkfile | 5 | ||||
-rw-r--r-- | src/cmd/upas/smtp/mxdial.c | 8 | ||||
-rw-r--r-- | src/cmd/upas/smtp/smtpd.c | 2 | ||||
-rw-r--r-- | src/cmd/upas/smtp/smtpd.y | 4 |
4 files changed, 13 insertions, 6 deletions
diff --git a/src/cmd/upas/smtp/mkfile b/src/cmd/upas/smtp/mkfile index c4c7e053..9d5bf940 100644 --- a/src/cmd/upas/smtp/mkfile +++ b/src/cmd/upas/smtp/mkfile @@ -41,12 +41,13 @@ smtpd.tab.c: smtpd.y smtpd.h sed 's/yy/zz/g' < xxx > $target rm xxx -rfc822.tab.c: rfc822.y smtp.h +rfc822.tab.c rfc822.tab.h: rfc822.y smtp.h 9 yacc -d -o $target rfc822.y + mv y.tab.h rfc822.tab.h clean:V: rm -f *.[$OS] [$OS].$TARG smtpd.tab.c rfc822.tab.c y.tab.? y.debug $TARG -../common/libcommon.a +../common/libcommon.a: cd ../common; mk diff --git a/src/cmd/upas/smtp/mxdial.c b/src/cmd/upas/smtp/mxdial.c index 13f40ab5..ae272c7d 100644 --- a/src/cmd/upas/smtp/mxdial.c +++ b/src/cmd/upas/smtp/mxdial.c @@ -23,7 +23,7 @@ extern int debug; static int mxlookup(DS*, char*); static int mxlookup1(DS*, char*); -static int compar(void*, void*); +static int compar(const void*, const void*); static int callmx(DS*, char*, char*); static void expand_meta(DS *ds); extern int cistrcmp(char*, char*); @@ -50,8 +50,10 @@ mxdial(char *addr, char *ddomain, char *gdomain) } static int -timeout(void*, char *msg) +timeout(void *v, char *msg) { + USED(v); + if(strstr(msg, "alarm")) return 1; return 0; @@ -232,7 +234,7 @@ mxlookup1(DS *ds, char *domain) } static int -compar(void *a, void *b) +compar(const void *a, const void *b) { return ((Mx*)a)->pref - ((Mx*)b)->pref; } diff --git a/src/cmd/upas/smtp/smtpd.c b/src/cmd/upas/smtp/smtpd.c index 8bd4511d..7b54b3cf 100644 --- a/src/cmd/upas/smtp/smtpd.c +++ b/src/cmd/upas/smtp/smtpd.c @@ -7,7 +7,7 @@ #include <mp.h> #include <libsec.h> #include <auth.h> -#include "../smtp/y.tab.h" +#include "../smtp/rfc822.tab.h" #define DBGMX 1 diff --git a/src/cmd/upas/smtp/smtpd.y b/src/cmd/upas/smtp/smtpd.y index 57b89a02..00a3fe95 100644 --- a/src/cmd/upas/smtp/smtpd.y +++ b/src/cmd/upas/smtp/smtpd.y @@ -189,6 +189,7 @@ parseinit(void) yyfp = &bin; } +int yylex(void) { int c; @@ -229,6 +230,7 @@ cat(YYSTYPE *y1, YYSTYPE *y2, YYSTYPE *y3, YYSTYPE *y4, YYSTYPE *y5, YYSTYPE *y6 { YYSTYPE rv; + memset(&rv, 0, sizeof rv); if(y1->s) rv.s = y1->s; else { @@ -296,6 +298,7 @@ cat(YYSTYPE *y1, YYSTYPE *y2, YYSTYPE *y3, YYSTYPE *y4, YYSTYPE *y5, YYSTYPE *y6 } } else return rv; + return rv; } void @@ -312,6 +315,7 @@ anonymous(void) { YYSTYPE rv; + memset(&rv, 0, sizeof rv); rv.s = s_copy("/dev/null"); return rv; } |