mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-14 17:45:04 +00:00
Use macro XS_ALL were possible.
This commit is contained in:
parent
e2c332c68a
commit
9df1cb129e
3 changed files with 4 additions and 7 deletions
5
data.c
5
data.c
|
@ -433,9 +433,6 @@ int object_add(const char *id, d_char *obj)
|
|||
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) {
|
||||
flock(fileno(f), LOCK_EX);
|
||||
|
||||
|
@ -1246,7 +1243,7 @@ int static_get(snac *snac, const char *id, d_char **data, int *size)
|
|||
FILE *f;
|
||||
int status = 404;
|
||||
|
||||
*size = 0xfffffff;
|
||||
*size = XS_ALL;
|
||||
|
||||
if ((f = fopen(fn, "rb")) != NULL) {
|
||||
*data = xs_read(f, size);
|
||||
|
|
4
html.c
4
html.c
|
@ -1008,7 +1008,7 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
|
|||
status = 200;
|
||||
}
|
||||
else {
|
||||
xs *list = local_list(&snac, 0xfffffff);
|
||||
xs *list = local_list(&snac, XS_ALL);
|
||||
|
||||
*body = html_timeline(&snac, list, 1);
|
||||
*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 {
|
||||
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);
|
||||
*b_size = strlen(*body);
|
||||
|
|
2
main.c
2
main.c
|
@ -156,7 +156,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
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);
|
||||
|
||||
printf("%s\n", body);
|
||||
|
|
Loading…
Reference in a new issue