json: Don't error out if chunksize is omitted
authorAndre Heinecke <aheinecke@intevation.de>
Wed, 8 Aug 2018 07:49:51 +0000 (09:49 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Wed, 8 Aug 2018 07:49:51 +0000 (09:49 +0200)
* src/gpgme-json.c (encode_and_chunk): Don't error out
if no chunksize is provided.

--
This fixes 82e4b900a96c837392259469a9a5821a95e7a707 which
caused every call without chunksize to error out.

src/gpgme-json.c

index 81b70aa..9cae944 100644 (file)
@@ -1491,10 +1491,7 @@ encode_and_chunk (cjson_t request, cjson_t response)
     }
 
   if (!chunksize)
-    {
-      err = GPG_ERR_INV_VALUE;
-      goto leave;
-    }
+    goto leave;
 
   pending_data.buffer = data;
   /* Data should already be encoded so that it does not