From 65c7a44f7017c371a5df9a85f6a5929e022ddf5a Mon Sep 17 00:00:00 2001 From: Kaloyan Raev Date: Fri, 22 Dec 2017 23:22:12 +0200 Subject: [PATCH] Fixes #407: Add bucket_id to storj_file_meta_t --- src/downloader.c | 1 + src/storj.c | 3 +++ src/storj.h | 1 + 3 files changed, 5 insertions(+) diff --git a/src/downloader.c b/src/downloader.c index de40876..eba0fd3 100644 --- a/src/downloader.c +++ b/src/downloader.c @@ -1240,6 +1240,7 @@ static void request_info(uv_work_t *work) req->info->size = 0; req->info->hmac = NULL; req->info->id = NULL; + req->info->bucket_id = NULL; req->info->decrypted = false; req->info->index = NULL; diff --git a/src/storj.c b/src/storj.c index 0c0470f..bf2a36e 100644 --- a/src/storj.c +++ b/src/storj.c @@ -292,6 +292,7 @@ static void list_files_request_worker(uv_work_t *work) struct json_object *mimetype; struct json_object *size; struct json_object *id; + struct json_object *bucket_id; struct json_object *created; struct json_object *hmac; struct json_object *hmac_value; @@ -303,6 +304,7 @@ static void list_files_request_worker(uv_work_t *work) json_object_object_get_ex(file, "mimetype", &mimetype); json_object_object_get_ex(file, "size", &size); json_object_object_get_ex(file, "id", &id); + json_object_object_get_ex(file, "bucket", &bucket_id); json_object_object_get_ex(file, "created", &created); json_object_object_get_ex(file, "hmac", &hmac); json_object_object_get_ex(hmac, "value", &hmac_value); @@ -316,6 +318,7 @@ static void list_files_request_worker(uv_work_t *work) file->index = NULL; file->hmac = json_object_get_string(hmac_value); file->id = json_object_get_string(id); + file->bucket_id = json_object_get_string(bucket_id); file->decrypted = false; file->filename = NULL; diff --git a/src/storj.h b/src/storj.h index abf189d..3c0f427 100755 --- a/src/storj.h +++ b/src/storj.h @@ -294,6 +294,7 @@ typedef struct { uint64_t size; const char *hmac; const char *id; + const char *bucket_id; bool decrypted; const char *index; } storj_file_meta_t;