aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/main.c b/main.c
index 66328a8..7fca16d 100644
--- a/main.c
+++ b/main.c
@@ -700,14 +700,20 @@ static int getnode(const struct http_payload *const p,
goto end;
}
- const struct page_quota *const ppq = available ?
- &(const struct page_quota)
- {
- .cur = cur,
- .max = max
- } : NULL;
+ const struct page_resource pr =
+ {
+ .r = r,
+ .args = p->args,
+ .n_args = p->n_args,
+ .dir = dir.str,
+ .root = root.str,
+ .res = d.str,
+ .q = available ?
+ &(const struct page_quota) {.cur = cur, .max = max }
+ : NULL
+ };
- ret = page_resource(r, dir.str, root.str, d.str, ppq);
+ ret = page_resource(&pr);
end:
dynstr_free(&dir);