From 58fb17ea4d6c3f0178d75fbd05c3e1d9a2997313 Mon Sep 17 00:00:00 2001 From: Ken Hornstein Date: Thu, 16 Dec 2010 13:20:31 -0500 Subject: [PATCH] Fix so this compiles without SASL support. Damn you, Oliver Kiddle, for finding all of the bugs I add to nmh! --- mts/smtp/smtp.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index 470d72d..e7a64a0 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -441,12 +441,12 @@ sendmail_init (char *client, char *server, int watch, int verbose, if (client == NULL || *client == '\0') client = "localhost"; -#ifdef CYRUS_SASL +#if defined(CYRUS_SASL) || defined(TLS_SUPPORT) sasl_inbuffer = malloc(SASL_MAXRECVBUF); if (!sasl_inbuffer) return sm_ierror("Unable to allocate %d bytes for read buffer", SASL_MAXRECVBUF); -#endif /* CYRUS_SASL */ +#endif /* CYRUS_SASL || TLS_SUPPORT */ if (pipe (pdi) == NOTOK) return sm_ierror ("no pipes"); @@ -1572,6 +1572,7 @@ sm_fgetc(FILE *f) * encryption working */ +#ifdef CYRUS_SASL if (sasl_complete == 0 || sasl_ssf == 0) { retbuf = tmpbuf; retbufsize = cc; @@ -1585,6 +1586,10 @@ sm_fgetc(FILE *f) return -2; } } +#else /* ! CYRUS_SASL */ + retbuf = tmpbuf; + retbufsize = cc; +#endif /* CYRUS_SASL */ } if (retbufsize > SASL_MAXRECVBUF) { -- 1.7.10.4