Got rid of old d_char.

This commit is contained in:
default 2023-08-31 07:00:15 +02:00
parent b5b59bd574
commit dfeb4668a7
3 changed files with 5 additions and 6 deletions

2
data.c
View File

@ -23,7 +23,7 @@ double disk_layout = 2.7;
/* storage serializer */ /* storage serializer */
pthread_mutex_t data_mutex = {0}; pthread_mutex_t data_mutex = {0};
int snac_upgrade(d_char **error); int snac_upgrade(xs_str **error);
int srv_open(char *basedir, int auto_upgrade) int srv_open(char *basedir, int auto_upgrade)

View File

@ -210,7 +210,7 @@ int snac_init(const char *basedir)
} }
void new_password(const char *uid, d_char **clear_pwd, d_char **hashed_pwd) void new_password(const char *uid, xs_str **clear_pwd, xs_str **hashed_pwd)
/* creates a random password */ /* creates a random password */
{ {
int rndbuf[3]; int rndbuf[3];

View File

@ -15,7 +15,7 @@ int webfinger_request_signed(snac *snac, const char *qs, char **actor, char **us
int p_size = 0; int p_size = 0;
xs *headers = xs_dict_new(); xs *headers = xs_dict_new();
xs *l = NULL; xs *l = NULL;
d_char *host = NULL; xs_str *host = NULL;
xs *resource = NULL; xs *resource = NULL;
if (xs_startswith(qs, "https:/" "/")) { if (xs_startswith(qs, "https:/" "/")) {
@ -106,7 +106,7 @@ 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)
/* serves webfinger queries */ /* serves webfinger queries */
{ {
@ -170,7 +170,6 @@ int webfinger_get_handler(d_char *req, char *q_path,
xs *aaj = xs_dict_new(); xs *aaj = xs_dict_new();
xs *links = xs_list_new(); xs *links = xs_list_new();
xs *obj = xs_dict_new(); xs *obj = xs_dict_new();
d_char *j;
acct = xs_fmt("acct:%s@%s", acct = xs_fmt("acct:%s@%s",
xs_dict_get(snac.config, "uid"), xs_dict_get(srv_config, "host")); xs_dict_get(snac.config, "uid"), xs_dict_get(srv_config, "host"));
@ -184,7 +183,7 @@ int webfinger_get_handler(d_char *req, char *q_path,
obj = xs_dict_append(obj, "subject", acct); obj = xs_dict_append(obj, "subject", acct);
obj = xs_dict_append(obj, "links", links); obj = xs_dict_append(obj, "links", links);
j = xs_json_dumps(obj, 4); xs_str *j = xs_json_dumps(obj, 4);
user_free(&snac); user_free(&snac);