From 94e10d52fb3b09b928e6dc78d9d5dc2e3f56bc77 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 12 Jun 2018 10:46:55 -0400 Subject: [PATCH] anopesmtp: fix previous commit --- src/tools/anopesmtp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/anopesmtp.cpp b/src/tools/anopesmtp.cpp index 548a10ff6..8b13bbdc0 100644 --- a/src/tools/anopesmtp.cpp +++ b/src/tools/anopesmtp.cpp @@ -429,6 +429,8 @@ int smtp_send_email() void smtp_disconnect() { + char buf[1024]; + if (!smtp_send("QUIT\r\n")) { alog("SMTP: error writing to socket"); @@ -439,7 +441,7 @@ void smtp_disconnect() alog("SMTP: error reading buffer"); } - code = smtp_get_code(buf); + int code = smtp_get_code(buf); if (code != 221) { alog("SMTP: error expected code 221 got %d",code);