summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/html.c b/html.c
index e132f17..19ab6b7 100644
--- a/html.c
+++ b/html.c
@@ -1875,9 +1875,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
1875 if (cache && history_mtime(&snac, h) > timeline_mtime(&snac)) { 1875 if (cache && history_mtime(&snac, h) > timeline_mtime(&snac)) {
1876 snac_debug(&snac, 1, xs_fmt("serving cached local timeline")); 1876 snac_debug(&snac, 1, xs_fmt("serving cached local timeline"));
1877 1877
1878 *body = history_get(&snac, h); 1878 status = history_get(&snac, h, body, b_size, NULL, NULL);
1879 *b_size = strlen(*body);
1880 status = 200;
1881 } 1879 }
1882 else { 1880 else {
1883 xs *list = timeline_list(&snac, "public", skip, show); 1881 xs *list = timeline_list(&snac, "public", skip, show);
@@ -1905,9 +1903,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
1905 if (cache && history_mtime(&snac, "timeline.html_") > timeline_mtime(&snac)) { 1903 if (cache && history_mtime(&snac, "timeline.html_") > timeline_mtime(&snac)) {
1906 snac_debug(&snac, 1, xs_fmt("serving cached timeline")); 1904 snac_debug(&snac, 1, xs_fmt("serving cached timeline"));
1907 1905
1908 *body = history_get(&snac, "timeline.html_"); 1906 status = history_get(&snac, "timeline.html_", body, b_size, NULL, NULL);
1909 *b_size = strlen(*body);
1910 status = 200;
1911 } 1907 }
1912 else { 1908 else {
1913 snac_debug(&snac, 1, xs_fmt("building timeline")); 1909 snac_debug(&snac, 1, xs_fmt("building timeline"));
@@ -1996,10 +1992,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
1996 status = 404; 1992 status = 404;
1997 } 1993 }
1998 else 1994 else
1999 if ((*body = history_get(&snac, id)) != NULL) { 1995 status = history_get(&snac, id, body, b_size, NULL, NULL);
2000 *b_size = strlen(*body);
2001 status = 200;
2002 }
2003 } 1996 }
2004 } 1997 }
2005 else 1998 else