diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2008-07-08 21:16:18 +0000 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2008-07-08 21:16:18 +0000 |
commit | 60f0b4fffe3de8eb1a1fc3015c2f6643fdccb57a (patch) | |
tree | e33d81438aeb7fae78945db99f4928d36689ef44 /tests/libtest | |
parent | a95e600eb0fa1fdba0d2627ff15aaf9392b6c253 (diff) |
Fixed test 554 to pass the torture test.
Diffstat (limited to 'tests/libtest')
-rw-r--r-- | tests/libtest/lib554.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/libtest/lib554.c b/tests/libtest/lib554.c index 792bbbed2..fe0c16a66 100644 --- a/tests/libtest/lib554.c +++ b/tests/libtest/lib554.c @@ -44,11 +44,14 @@ int test(char *URL) struct curl_httppost *lastptr=NULL; struct WriteThis pooh; + if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { + fprintf(stderr, "curl_global_init() failed\n"); + return TEST_ERR_MAJOR_BAD; + } + pooh.readptr = data; pooh.sizeleft = strlen(data); - curl_global_init(CURL_GLOBAL_ALL); - /* Fill in the file upload field */ formrc = curl_formadd(&formpost, &lastptr, @@ -81,13 +84,9 @@ int test(char *URL) if(formrc) printf("curl_formadd(3) = %d\n", (int)formrc); - if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { - fprintf(stderr, "curl_global_init() failed\n"); - return TEST_ERR_MAJOR_BAD; - } - if ((curl = curl_easy_init()) == NULL) { fprintf(stderr, "curl_easy_init() failed\n"); + curl_formfree(formpost); curl_global_cleanup(); return TEST_ERR_MAJOR_BAD; } |