X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Fsmtp-dummy.c;h=86d43162d9750e029b134477ff3ec1f05e101317;hb=345faab1f5c73f5412677d4a0aaa383a8462b2e5;hp=9da8202fd1ff8c0f7a9b91ff8f6490350831a5dc;hpb=b0ba84f9e71b0f117dc0bdf0b790c6e2341d3949;p=notmuch diff --git a/test/smtp-dummy.c b/test/smtp-dummy.c index 9da8202f..86d43162 100644 --- a/test/smtp-dummy.c +++ b/test/smtp-dummy.c @@ -37,7 +37,9 @@ #include #include #include -#include +#include +#include +#include #include #include @@ -71,7 +73,7 @@ static int process_command (FILE *peer, FILE *output, const char *command) { if (STRNCMP_LITERAL (command, "EHLO ") == 0) { - fprintf (peer, "502\r\n"); + fprintf (peer, "502 not implemented\r\n"); fflush (peer); } else if (STRNCMP_LITERAL (command, "HELO ") == 0) { fprintf (peer, "250 localhost\r\n"); @@ -159,6 +161,7 @@ main (int argc, char *argv[]) return 1; } + memset (&addr, 0, sizeof (addr)); addr.sin_family = AF_INET; addr.sin_port = htons (25025); addr.sin_addr = *(struct in_addr *) hostinfo->h_addr;