diff options
author | Simon Rettberg | 2024-04-22 16:40:20 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-04-22 16:40:20 +0200 |
commit | b69059db1447df71df4e918eb9c82907b1cb612d (patch) | |
tree | 8baa104efb518fb4ea92b810d13e6f3ae8672633 | |
parent | [FUSE] Rename version -> revision in /create (diff) | |
download | dnbd3-b69059db1447df71df4e918eb9c82907b1cb612d.tar.gz dnbd3-b69059db1447df71df4e918eb9c82907b1cb612d.tar.xz dnbd3-b69059db1447df71df4e918eb9c82907b1cb612d.zip |
[FUSE] Move curl reset to start of function
-rw-r--r-- | src/fuse/cowfile.c | 3 |
1 files changed, 1 insertions, 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 ); |