summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorGravatar default2024-03-12 18:04:09 +0100
committerGravatar default2024-03-12 18:04:09 +0100
commitcd0e211354575f89f169da2e86b5b234a2624b9d (patch)
treebc681f26bd01436c1fdf06ca3cc74a941d234d37 /data.c
parentAdded actor refreshing via the user queue. (diff)
downloadsnac2-cd0e211354575f89f169da2e86b5b234a2624b9d.tar.gz
snac2-cd0e211354575f89f169da2e86b5b234a2624b9d.tar.xz
snac2-cd0e211354575f89f169da2e86b5b234a2624b9d.zip
Don't call enqueue_actor_request() with a NULL user.
Diffstat (limited to 'data.c')
-rw-r--r--data.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/data.c b/data.c
index 77d81d5..3da25f1 100644
--- a/data.c
+++ b/data.c
@@ -811,6 +811,16 @@ double object_mtime(const char *id)
811} 811}
812 812
813 813
814void object_touch(const char *id)
815{
816 xs *md5 = xs_md5_hex(id, strlen(id));
817 xs *fn = _object_fn_by_md5(md5, "object_touch");
818
819 if (mtime(fn))
820 utimes(fn, NULL);
821}
822
823
814xs_str *_object_index_fn(const char *id, const char *idxsfx) 824xs_str *_object_index_fn(const char *id, const char *idxsfx)
815/* returns the filename of an object's index */ 825/* returns the filename of an object's index */
816{ 826{
@@ -1586,7 +1596,7 @@ int actor_get_refresh(snac *user, const char *actor, xs_dict **data)
1586{ 1596{
1587 int status = actor_get(actor, data); 1597 int status = actor_get(actor, data);
1588 1598
1589 if (status == 205) 1599 if (status == 205 && user && !xs_startswith(user->actor, srv_baseurl))
1590 enqueue_actor_request(user, actor); 1600 enqueue_actor_request(user, actor);
1591 1601
1592 return status; 1602 return status;