From f3dcc8a13af93f6442cb370497bc76df4bba2b99 Mon Sep 17 00:00:00 2001 From: "me@ow.nekobit.net" Date: Fri, 18 Mar 2022 14:44:32 +0000 Subject: [PATCH] Fix errors and child pass FossilOrigin-Name: a62c872cd08b5cedb84e342bdda73701b9424c7852b71d49af48e3563e5f2c1e --- src/request.c | 2 ++ src/status.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/request.c b/src/request.c index 37d806d..68f0243 100644 --- a/src/request.c +++ b/src/request.c @@ -42,11 +42,13 @@ int mastodont_request(mastodont_t* data, struct mastodont_request_args* args) goto cleanup; } + /* if (mstdnt_check_error(&results, storage)) { res = 1; goto cleanup_res; } + */ /* Optional */ if (args->callback) args->callback(&results, storage, args->args); diff --git a/src/status.c b/src/status.c index ca3348a..c14350f 100644 --- a/src/status.c +++ b/src/status.c @@ -24,7 +24,6 @@ int mstdnt_status_from_json(struct mstdnt_status* status, cJSON* js) { - js = js->child; /* Get in */ cJSON* v; struct _mstdnt_generic_args att_args = { @@ -73,7 +72,7 @@ int mstdnt_status_from_result(struct mstdnt_fetch_results* results, !cJSON_IsObject(root)) return 1; - mstdnt_status_from_json(status, root); + mstdnt_status_from_json(status, root->child); return 1; } @@ -322,7 +321,7 @@ int mstdnt_status_context_from_json(struct mstdnt_fetch_results* results, return 1; cJSON_ArrayForEach(status_item, v) - mstdnt_status_from_json((*stat_ptr) + (*size_ptr)++, status_item); + mstdnt_status_from_json((*stat_ptr) + (*size_ptr)++, status_item->child); } } }