Use macro XS_ALL were possible.

This commit is contained in:
default 2022-11-25 12:21:26 +01:00
parent e2c332c68a
commit 9df1cb129e
3 changed files with 4 additions and 7 deletions

5
data.c
View file

@ -433,9 +433,6 @@ int object_add(const char *id, d_char *obj)
return 204; /* No content */ return 204; /* No content */
} }
// if (xs_dict_get(obj, "suspended") != NULL)
// srv_log(xs_fmt("object_add suspended: true %s", id));
if ((f = fopen(fn, "w")) != NULL) { if ((f = fopen(fn, "w")) != NULL) {
flock(fileno(f), LOCK_EX); flock(fileno(f), LOCK_EX);
@ -1246,7 +1243,7 @@ int static_get(snac *snac, const char *id, d_char **data, int *size)
FILE *f; FILE *f;
int status = 404; int status = 404;
*size = 0xfffffff; *size = XS_ALL;
if ((f = fopen(fn, "rb")) != NULL) { if ((f = fopen(fn, "rb")) != NULL) {
*data = xs_read(f, size); *data = xs_read(f, size);

4
html.c
View file

@ -1008,7 +1008,7 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
status = 200; status = 200;
} }
else { else {
xs *list = local_list(&snac, 0xfffffff); xs *list = local_list(&snac, XS_ALL);
*body = html_timeline(&snac, list, 1); *body = html_timeline(&snac, list, 1);
*b_size = strlen(*body); *b_size = strlen(*body);
@ -1034,7 +1034,7 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
else { else {
snac_debug(&snac, 1, xs_fmt("building timeline")); snac_debug(&snac, 1, xs_fmt("building timeline"));
xs *list = timeline_list(&snac, 0xfffffff); xs *list = timeline_list(&snac, XS_ALL);
*body = html_timeline(&snac, list, 0); *body = html_timeline(&snac, list, 0);
*b_size = strlen(*body); *b_size = strlen(*body);

2
main.c
View file

@ -156,7 +156,7 @@ int main(int argc, char *argv[])
} }
if (strcmp(cmd, "timeline") == 0) { if (strcmp(cmd, "timeline") == 0) {
xs *list = local_list(&snac, 0xfffffff); xs *list = local_list(&snac, XS_ALL);
xs *body = html_timeline(&snac, list, 1); xs *body = html_timeline(&snac, list, 1);
printf("%s\n", body); printf("%s\n", body);