commit 9df1cb1

default  ·  2022-11-25 11:21:26 +0000 UTC
parent e2c332c
Use macro XS_ALL were possible.
3 files changed,  +4, -7
M data.c
M html.c
M main.c
M data.c
+1, -4
 1@@ -433,9 +433,6 @@ int object_add(const char *id, d_char *obj)
 2         return 204; /* No content */
 3     }
 4 
 5-//    if (xs_dict_get(obj, "suspended") != NULL)
 6-//        srv_log(xs_fmt("object_add suspended: true %s", id));
 7-
 8     if ((f = fopen(fn, "w")) != NULL) {
 9         flock(fileno(f), LOCK_EX);
10 
11@@ -1246,7 +1243,7 @@ int static_get(snac *snac, const char *id, d_char **data, int *size)
12     FILE *f;
13     int status = 404;
14 
15-    *size = 0xfffffff;
16+    *size = XS_ALL;
17 
18     if ((f = fopen(fn, "rb")) != NULL) {
19         *data = xs_read(f, size);
M html.c
+2, -2
 1@@ -1008,7 +1008,7 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
 2             status  = 200;
 3         }
 4         else {
 5-            xs *list = local_list(&snac, 0xfffffff);
 6+            xs *list = local_list(&snac, XS_ALL);
 7 
 8             *body   = html_timeline(&snac, list, 1);
 9             *b_size = strlen(*body);
10@@ -1034,7 +1034,7 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
11             else {
12                 snac_debug(&snac, 1, xs_fmt("building timeline"));
13 
14-                xs *list = timeline_list(&snac, 0xfffffff);
15+                xs *list = timeline_list(&snac, XS_ALL);
16 
17                 *body   = html_timeline(&snac, list, 0);
18                 *b_size = strlen(*body);
M main.c
+1, -1
1@@ -156,7 +156,7 @@ int main(int argc, char *argv[])
2     }
3 
4     if (strcmp(cmd, "timeline") == 0) {
5-        xs *list = local_list(&snac, 0xfffffff);
6+        xs *list = local_list(&snac, XS_ALL);
7         xs *body = html_timeline(&snac, list, 1);
8 
9         printf("%s\n", body);