From 0d037cfdce7d295052cf4c91eda6d7fda7a692a8 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sun, 28 Dec 2014 13:01:11 +0000 Subject: test1520: Fixed initial teething problems * Missing initialisation of upload status caused a seg fault * Missing data termination caused corrupt data to be uploaded * Data verification should be performed in element * Added missing recipient list cleanup --- tests/data/test1520 | 6 +++++- tests/libtest/lib1520.c | 22 ++++++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/tests/data/test1520 b/tests/data/test1520 index c8b62fd07..5f9344d94 100644 --- a/tests/data/test1520 +++ b/tests/data/test1520 @@ -44,6 +44,9 @@ EHLO 1520 MAIL FROM: RCPT TO: DATA +QUIT + + From: different To: another @@ -54,6 +57,7 @@ To: another .. body - +. + diff --git a/tests/libtest/lib1520.c b/tests/libtest/lib1520.c index bef1e1364..c6d2e820a 100644 --- a/tests/libtest/lib1520.c +++ b/tests/libtest/lib1520.c @@ -30,16 +30,17 @@ #define FROM "" static const char *payload_text[] = { -"From: different\r\n", -"To: another\r\n", -"\r\n", -"\r\n", -".\r\n", -".\r\n", -"\r\n", -".\r\n", -"\r\n", -"body" + "From: different\r\n", + "To: another\r\n", + "\r\n", + "\r\n", + ".\r\n", + ".\r\n", + "\r\n", + ".\r\n", + "\r\n", + "body", + NULL }; struct upload_status { @@ -103,6 +104,7 @@ int test(char *URL) test_cleanup: + curl_slist_free_all(rcpt_list); curl_easy_cleanup(curl); curl_global_cleanup(); -- cgit v1.2.3