summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2023-02-06 20:29:18 +0100
committerGravatar default2023-02-06 20:29:18 +0100
commitf6d51357afcb047a0804600a19694944f64e82bc (patch)
treeb1679d9557e1b36a309fdf50dfb178900473f0d4
parentThe pool of threads now process q_items. (diff)
downloadsnac2-f6d51357afcb047a0804600a19694944f64e82bc.tar.gz
snac2-f6d51357afcb047a0804600a19694944f64e82bc.tar.xz
snac2-f6d51357afcb047a0804600a19694944f64e82bc.zip
process_queue() now posts the q_item to the thread pool.
Instead of calling process_queue_item() itself.
-rw-r--r--activitypub.c2
-rw-r--r--snac.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c
index 5aae251..651c18c 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1215,7 +1215,7 @@ void process_queue(void)
1215 continue; 1215 continue;
1216 } 1216 }
1217 1217
1218 process_queue_item(q_item); 1218 job_post(q_item);
1219 } 1219 }
1220} 1220}
1221 1221
diff --git a/snac.h b/snac.h
index e9124bb..642606d 100644
--- a/snac.h
+++ b/snac.h
@@ -172,7 +172,6 @@ void process_user_queue(snac *snac);
172void process_queue_item(xs_dict *q_item); 172void process_queue_item(xs_dict *q_item);
173void process_queue(void); 173void process_queue(void);
174 174
175void post(snac *snac, char *msg);
176int activitypub_get_handler(d_char *req, char *q_path, 175int activitypub_get_handler(d_char *req, char *q_path,
177 char **body, int *b_size, char **ctype); 176 char **body, int *b_size, char **ctype);
178int activitypub_post_handler(d_char *req, char *q_path, 177int activitypub_post_handler(d_char *req, char *q_path,
@@ -189,3 +188,6 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
189int snac_init(const char *_basedir); 188int snac_init(const char *_basedir);
190int adduser(const char *uid); 189int adduser(const char *uid);
191int resetpwd(snac *snac); 190int resetpwd(snac *snac);
191
192void job_post(const xs_val *job);
193void job_wait(xs_val **job);