json: Allow NULL request in encode and chunk
* src/gpgme-json.c (encode_and_chunk): Don't error on NULL request. -- This fixes the error that is passed when parthing the json object failed and request would be NULL. Instead of the JSON parser error it would otherwise report that encode and chunk failed.
This commit is contained in:
parent
8aa61fd3a2
commit
7d3c13df26
@ -1521,7 +1521,7 @@ encode_and_chunk (cjson_t request, cjson_t response)
|
|||||||
{
|
{
|
||||||
char *data;
|
char *data;
|
||||||
gpg_error_t err = 0;
|
gpg_error_t err = 0;
|
||||||
size_t chunksize;
|
size_t chunksize = 0;
|
||||||
char *getmore_request = NULL;
|
char *getmore_request = NULL;
|
||||||
|
|
||||||
if (opt_interactive)
|
if (opt_interactive)
|
||||||
@ -1537,7 +1537,6 @@ encode_and_chunk (cjson_t request, cjson_t response)
|
|||||||
|
|
||||||
if (!request)
|
if (!request)
|
||||||
{
|
{
|
||||||
err = GPG_ERR_INV_VALUE;
|
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user