Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #408 from kaloyan-raev/bucket-id
Browse files Browse the repository at this point in the history
Fixes #407: Add bucket_id to storj_file_meta_t
  • Loading branch information
braydonf authored Dec 30, 2017
2 parents 1ebb1d6 + 65c7a44 commit 59a253c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/downloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 3 additions & 0 deletions src/storj.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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;

Expand Down
1 change: 1 addition & 0 deletions src/storj.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 59a253c

Please sign in to comment.