Fix compilation with -o2
authorWilfried Goesgens <dothebart@citadel.org>
Mon, 20 Oct 2014 19:14:24 +0000 (21:14 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 20 Oct 2014 19:14:24 +0000 (21:14 +0200)
citadel/modules/smtp/serv_smtp.c

index eddad6be71fb2f5bad8f63ed6c2ab784383bfc39..4abb0a3fe0694c68f276a5d15f90b02444692625 100644 (file)
@@ -999,6 +999,7 @@ void smtp_starttls(long offset, long flags)
  */
 void smtp_command_loop(void)
 {
+       static const ConstStr AuthPlainStr = {HKEY("AUTH PLAIN")};
        struct CitContext *CCC = CC;
        citsmtp *sSMTP = SMTP;
        const char *pch, *pchs;
@@ -1019,7 +1020,10 @@ void smtp_command_loop(void)
        syslog(LOG_DEBUG, "SMTP server: %s\n", ChrPtr(sSMTP->Cmd));
 
        if (sSMTP->command_state == smtp_user) {
-               smtp_get_user(0);
+               if (!strncmp(ChrPtr(sSMTP->Cmd), AuthPlainStr.Key, AuthPlainStr.len))
+                       smtp_try_plain(0, 0);
+               else
+                       smtp_get_user(0);
                return;
        }