From 6a2e1c980402cde16315fe91ff8d54ac852de8c5 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 22 Apr 2024 16:40:20 +0200 Subject: [FUSE] Move curl reset to start of function --- src/fuse/cowfile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fuse/cowfile.c b/src/fuse/cowfile.c index 67f3eab..380b474 100644 --- a/src/fuse/cowfile.c +++ b/src/fuse/cowfile.c @@ -199,6 +199,7 @@ static bool createSession( const char *imageName, uint16_t rid ) char body[1000], reply[500]; const char *nameEsc; + curl_easy_reset( curl ); snprintf( url, COW_URL_STRING_SIZE, COW_API_CREATE, cowServerAddress ); logadd( LOG_INFO, "COW_API_CREATE URL: %s", url ); curl_easy_setopt( curl, CURLOPT_POST, 1L ); @@ -239,7 +240,6 @@ static bool createSession( const char *imageName, uint16_t rid ) return false; } strncpy( metadata->uuid, reply, sizeof(metadata->uuid) ); - curl_easy_reset( curl ); logadd( LOG_DEBUG1, "Cow session started, uuid: %s", metadata->uuid ); return true; } @@ -324,7 +324,6 @@ static bool postMergeRequest() char *uuid; curl_easy_reset( curl ); - snprintf( url, COW_URL_STRING_SIZE, COW_API_START_MERGE, cowServerAddress ); curl_easy_setopt( curl, CURLOPT_URL, url ); curl_easy_setopt( curl, CURLOPT_POST, 1L ); -- cgit v1.2.3-55-g7522