mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-15 01:55:03 +00:00
Added some const here and there.
This commit is contained in:
parent
511f5062b7
commit
753eadfd17
5 changed files with 17 additions and 13 deletions
|
@ -1426,7 +1426,7 @@ int process_queue(void)
|
||||||
|
|
||||||
/** HTTP handlers */
|
/** HTTP handlers */
|
||||||
|
|
||||||
int activitypub_get_handler(d_char *req, char *q_path,
|
int activitypub_get_handler(const xs_dict *req, const char *q_path,
|
||||||
char **body, int *b_size, char **ctype)
|
char **body, int *b_size, char **ctype)
|
||||||
{
|
{
|
||||||
int status = 200;
|
int status = 200;
|
||||||
|
@ -1519,8 +1519,8 @@ int activitypub_get_handler(d_char *req, char *q_path,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int activitypub_post_handler(d_char *req, char *q_path,
|
int activitypub_post_handler(const xs_dict *req, const char *q_path,
|
||||||
d_char *payload, int p_size,
|
char *payload, int p_size,
|
||||||
char **body, int *b_size, char **ctype)
|
char **body, int *b_size, char **ctype)
|
||||||
/* processes an input message */
|
/* processes an input message */
|
||||||
{
|
{
|
||||||
|
|
2
data.c
2
data.c
|
@ -1814,7 +1814,7 @@ static xs_dict *_new_qmsg(const char *type, const xs_val *msg, int retries)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void enqueue_input(snac *snac, xs_dict *msg, xs_dict *req, int retries)
|
void enqueue_input(snac *snac, const xs_dict *msg, const xs_dict *req, int retries)
|
||||||
/* enqueues an input message */
|
/* enqueues an input message */
|
||||||
{
|
{
|
||||||
xs *qmsg = _new_qmsg("input", msg, retries);
|
xs *qmsg = _new_qmsg("input", msg, retries);
|
||||||
|
|
6
html.c
6
html.c
|
@ -1289,7 +1289,8 @@ xs_str *html_notifications(snac *snac)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char **ctype)
|
int html_get_handler(const xs_dict *req, const char *q_path,
|
||||||
|
char **body, int *b_size, char **ctype)
|
||||||
{
|
{
|
||||||
char *accept = xs_dict_get(req, "accept");
|
char *accept = xs_dict_get(req, "accept");
|
||||||
int status = 404;
|
int status = 404;
|
||||||
|
@ -1546,7 +1547,8 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
|
int html_post_handler(const xs_dict *req, const char *q_path,
|
||||||
|
char *payload, int p_size,
|
||||||
char **body, int *b_size, char **ctype)
|
char **body, int *b_size, char **ctype)
|
||||||
{
|
{
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
2
httpd.c
2
httpd.c
|
@ -43,7 +43,7 @@ d_char *nodeinfo_2_0(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int server_get_handler(d_char *req, char *q_path,
|
int server_get_handler(xs_dict *req, char *q_path,
|
||||||
char **body, int *b_size, char **ctype)
|
char **body, int *b_size, char **ctype)
|
||||||
/* basic server services */
|
/* basic server services */
|
||||||
{
|
{
|
||||||
|
|
14
snac.h
14
snac.h
|
@ -155,7 +155,7 @@ void inbox_add(const char *inbox);
|
||||||
void inbox_add_by_actor(const xs_dict *actor);
|
void inbox_add_by_actor(const xs_dict *actor);
|
||||||
xs_list *inbox_list(void);
|
xs_list *inbox_list(void);
|
||||||
|
|
||||||
void enqueue_input(snac *snac, xs_dict *msg, xs_dict *req, int retries);
|
void enqueue_input(snac *snac, const xs_dict *msg, const xs_dict *req, int retries);
|
||||||
void enqueue_output_raw(const char *keyid, const char *seckey,
|
void enqueue_output_raw(const char *keyid, const char *seckey,
|
||||||
xs_dict *msg, xs_str *inbox, int retries);
|
xs_dict *msg, xs_str *inbox, int retries);
|
||||||
void enqueue_output(snac *snac, xs_dict *msg, xs_str *inbox, int retries);
|
void enqueue_output(snac *snac, xs_dict *msg, xs_str *inbox, int retries);
|
||||||
|
@ -187,7 +187,7 @@ int check_signature(snac *snac, xs_dict *req, xs_str **err);
|
||||||
void httpd(void);
|
void httpd(void);
|
||||||
|
|
||||||
int webfinger_request(const char *qs, char **actor, char **user);
|
int webfinger_request(const char *qs, char **actor, char **user);
|
||||||
int webfinger_get_handler(d_char *req, char *q_path,
|
int webfinger_get_handler(xs_dict *req, char *q_path,
|
||||||
char **body, int *b_size, char **ctype);
|
char **body, int *b_size, char **ctype);
|
||||||
|
|
||||||
const char *default_avatar_base64(void);
|
const char *default_avatar_base64(void);
|
||||||
|
@ -220,17 +220,19 @@ int process_user_queue(snac *snac);
|
||||||
void process_queue_item(xs_dict *q_item);
|
void process_queue_item(xs_dict *q_item);
|
||||||
int process_queue(void);
|
int process_queue(void);
|
||||||
|
|
||||||
int activitypub_get_handler(d_char *req, char *q_path,
|
int activitypub_get_handler(const xs_dict *req, const char *q_path,
|
||||||
char **body, int *b_size, char **ctype);
|
char **body, int *b_size, char **ctype);
|
||||||
int activitypub_post_handler(d_char *req, char *q_path,
|
int activitypub_post_handler(const xs_dict *req, const char *q_path,
|
||||||
char *payload, int p_size,
|
char *payload, int p_size,
|
||||||
char **body, int *b_size, char **ctype);
|
char **body, int *b_size, char **ctype);
|
||||||
|
|
||||||
d_char *not_really_markdown(const char *content);
|
d_char *not_really_markdown(const char *content);
|
||||||
d_char *sanitize(const char *str);
|
d_char *sanitize(const char *str);
|
||||||
|
|
||||||
int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char **ctype);
|
int html_get_handler(const xs_dict *req, const char *q_path,
|
||||||
int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
|
char **body, int *b_size, char **ctype);
|
||||||
|
int html_post_handler(const xs_dict *req, const char *q_path,
|
||||||
|
char *payload, int p_size,
|
||||||
char **body, int *b_size, char **ctype);
|
char **body, int *b_size, char **ctype);
|
||||||
|
|
||||||
int snac_init(const char *_basedir);
|
int snac_init(const char *_basedir);
|
||||||
|
|
Loading…
Reference in a new issue