All pastes #948706 Raw Edit

Miscellany

public diff v1 · immutable
·published 2008-03-19 11:51 UTC
rendered paste body
pvanhoof@schtrumpf:~/repos/tinymail/trunk$ svn diffIndex: libtinymail-camel/camel-lite/camel/providers/smtp/camel-smtp-transport.c===================================================================--- libtinymail-camel/camel-lite/camel/providers/smtp/camel-smtp-transport.c    (revision 3505)+++ libtinymail-camel/camel-lite/camel/providers/smtp/camel-smtp-transport.c    (working copy)@@ -1310,7 +1310,7 @@        char *cmdbuf, *respbuf = NULL;        CamelStreamFilter *filtered_stream;        CamelMimeFilter *crlffilter;-       int ret;+       int ret, mtry;         /* If the server doesn't support 8BITMIME, set our required encoding to be 7bit */        if (!(transport->flags & CAMEL_SMTP_TRANSPORT_8BITMIME))@@ -1414,22 +1414,27 @@                return FALSE;        } +       mtry = 0;        do {                /* Check for "250 Sender OK..." */-               g_free (respbuf);+               if (respbuf)+                       g_free (respbuf);                respbuf = camel_stream_buffer_read_line (CAMEL_STREAM_BUFFER (transport->istream));                 smtp_debug ("<- %s\n", respbuf ? respbuf : "(null)"); -               if (!respbuf || strncmp (respbuf, "250", 3)) {+               if (respbuf && strncmp (respbuf, "250", 3)) {                        smtp_set_exception (transport, TRUE, respbuf, _("DATA command failed"), ex);                        g_free (respbuf);                        return FALSE;                }-       } while (*(respbuf+3) == '-'); /* if we got "250-" then loop again */-       g_free (respbuf);+               mtry++;+       } while ((!respbuf && mtry < 3) || *(respbuf+3) == '-'); /* if we got "250-" then loop again */ -       return TRUE;+       if (respbuf)+               g_free (respbuf);++       return (mytry!=3); }  static gbooleanpvanhoof@schtrumpf:~/repos/tinymail/trunk$