diff options
| author | 2023-08-31 07:00:15 +0200 | |
|---|---|---|
| committer | 2023-08-31 07:00:15 +0200 | |
| commit | dfeb4668a742c52e8514ad39c5cae970fd025a14 (patch) | |
| tree | 1db45720b54ea5449ba09e3a29bbb094b80bb0e3 | |
| parent | Backport from xs. (diff) | |
| download | penes-snac2-dfeb4668a742c52e8514ad39c5cae970fd025a14.tar.gz penes-snac2-dfeb4668a742c52e8514ad39c5cae970fd025a14.tar.xz penes-snac2-dfeb4668a742c52e8514ad39c5cae970fd025a14.zip | |
Got rid of old d_char.
| -rw-r--r-- | data.c | 2 | ||||
| -rw-r--r-- | utils.c | 2 | ||||
| -rw-r--r-- | webfinger.c | 7 |
3 files changed, 5 insertions, 6 deletions
| @@ -23,7 +23,7 @@ double disk_layout = 2.7; | |||
| 23 | /* storage serializer */ | 23 | /* storage serializer */ |
| 24 | pthread_mutex_t data_mutex = {0}; | 24 | pthread_mutex_t data_mutex = {0}; |
| 25 | 25 | ||
| 26 | int snac_upgrade(d_char **error); | 26 | int snac_upgrade(xs_str **error); |
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | int srv_open(char *basedir, int auto_upgrade) | 29 | int srv_open(char *basedir, int auto_upgrade) |
| @@ -210,7 +210,7 @@ int snac_init(const char *basedir) | |||
| 210 | } | 210 | } |
| 211 | 211 | ||
| 212 | 212 | ||
| 213 | void new_password(const char *uid, d_char **clear_pwd, d_char **hashed_pwd) | 213 | void new_password(const char *uid, xs_str **clear_pwd, xs_str **hashed_pwd) |
| 214 | /* creates a random password */ | 214 | /* creates a random password */ |
| 215 | { | 215 | { |
| 216 | int rndbuf[3]; | 216 | int rndbuf[3]; |
diff --git a/webfinger.c b/webfinger.c index 1b11ab5..46867e9 100644 --- a/webfinger.c +++ b/webfinger.c | |||
| @@ -15,7 +15,7 @@ int webfinger_request_signed(snac *snac, const char *qs, char **actor, char **us | |||
| 15 | int p_size = 0; | 15 | int p_size = 0; |
| 16 | xs *headers = xs_dict_new(); | 16 | xs *headers = xs_dict_new(); |
| 17 | xs *l = NULL; | 17 | xs *l = NULL; |
| 18 | d_char *host = NULL; | 18 | xs_str *host = NULL; |
| 19 | xs *resource = NULL; | 19 | xs *resource = NULL; |
| 20 | 20 | ||
| 21 | if (xs_startswith(qs, "https:/" "/")) { | 21 | if (xs_startswith(qs, "https:/" "/")) { |
| @@ -106,7 +106,7 @@ int webfinger_request(const char *qs, char **actor, char **user) | |||
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | 108 | ||
| 109 | int webfinger_get_handler(d_char *req, char *q_path, | 109 | int webfinger_get_handler(xs_dict *req, char *q_path, |
| 110 | char **body, int *b_size, char **ctype) | 110 | char **body, int *b_size, char **ctype) |
| 111 | /* serves webfinger queries */ | 111 | /* serves webfinger queries */ |
| 112 | { | 112 | { |
| @@ -170,7 +170,6 @@ int webfinger_get_handler(d_char *req, char *q_path, | |||
| 170 | xs *aaj = xs_dict_new(); | 170 | xs *aaj = xs_dict_new(); |
| 171 | xs *links = xs_list_new(); | 171 | xs *links = xs_list_new(); |
| 172 | xs *obj = xs_dict_new(); | 172 | xs *obj = xs_dict_new(); |
| 173 | d_char *j; | ||
| 174 | 173 | ||
| 175 | acct = xs_fmt("acct:%s@%s", | 174 | acct = xs_fmt("acct:%s@%s", |
| 176 | xs_dict_get(snac.config, "uid"), xs_dict_get(srv_config, "host")); | 175 | 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, | |||
| 184 | obj = xs_dict_append(obj, "subject", acct); | 183 | obj = xs_dict_append(obj, "subject", acct); |
| 185 | obj = xs_dict_append(obj, "links", links); | 184 | obj = xs_dict_append(obj, "links", links); |
| 186 | 185 | ||
| 187 | j = xs_json_dumps(obj, 4); | 186 | xs_str *j = xs_json_dumps(obj, 4); |
| 188 | 187 | ||
| 189 | user_free(&snac); | 188 | user_free(&snac); |
| 190 | 189 | ||