From 8300fcd4c84d994e1f3f8312dbd0e11a0720dc07 Mon Sep 17 00:00:00 2001 From: josch Date: Fri, 5 Dec 2014 14:05:51 +0100 Subject: [PATCH] file/get_info: fix wrong response check --- mfapi/apicalls/file_get_info.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mfapi/apicalls/file_get_info.c b/mfapi/apicalls/file_get_info.c index 3a30ae3..a6fe213 100644 --- a/mfapi/apicalls/file_get_info.c +++ b/mfapi/apicalls/file_get_info.c @@ -93,7 +93,7 @@ static int _decode_file_get_info(mfhttp * conn, void *data) return -1; } - node = json_object_by_path(root, "response/file_info"); + node = json_object_by_path(root, "response"); retval = mfapi_check_response(node, "file/get_info"); if (retval != 0) { @@ -102,6 +102,8 @@ static int _decode_file_get_info(mfhttp * conn, void *data) return retval; } + node = json_object_by_path(root, "response/file_info"); + quickkey = json_object_get(node, "quickkey"); if (quickkey != NULL) file_set_key(file, json_string_value(quickkey));