diff options
author | default <nobody@localhost> | 2022-10-24 20:06:02 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2022-10-24 20:06:02 +0200 |
commit | d2095105de3fe8c3397df7d46a9d61011b74c09e (patch) | |
tree | 743600f6c31479d1012d6e77ef4de666e7de51ca /data.c | |
parent | 13ac53b06a094059099272259dd671f5363c27ae (diff) |
Don't load unneeded actor info in html_entry().
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -796,16 +796,17 @@ int actor_get(snac *snac, char *actor, d_char **data) status = 200; } - if ((f = fopen(fn, "r")) != NULL) { - xs *j = xs_readall(f); + if (data) { + if ((f = fopen(fn, "r")) != NULL) { + xs *j = xs_readall(f); - fclose(f); + fclose(f); - if (data) *data = xs_json_loads(j); + } + else + status = 500; } - else - status = 500; return status; } |