diff options
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 9 |
1 files changed, 9 insertions, 0 deletions
| @@ -146,6 +146,7 @@ void user_free(snac *snac) | |||
| 146 | xs_free(snac->config); | 146 | xs_free(snac->config); |
| 147 | xs_free(snac->config_o); | 147 | xs_free(snac->config_o); |
| 148 | xs_free(snac->key); | 148 | xs_free(snac->key); |
| 149 | xs_free(snac->links); | ||
| 149 | xs_free(snac->actor); | 150 | xs_free(snac->actor); |
| 150 | xs_free(snac->md5); | 151 | xs_free(snac->md5); |
| 151 | } | 152 | } |
| @@ -233,6 +234,14 @@ int user_open(snac *user, const char *uid) | |||
| 233 | } | 234 | } |
| 234 | else | 235 | else |
| 235 | srv_debug(2, xs_fmt("error opening '%s' %d", cfg_file, errno)); | 236 | srv_debug(2, xs_fmt("error opening '%s' %d", cfg_file, errno)); |
| 237 | |||
| 238 | /* verified links */ | ||
| 239 | xs *links_file = xs_fmt("%s/links.json", user->basedir); | ||
| 240 | |||
| 241 | if ((f = fopen(links_file, "r")) != NULL) { | ||
| 242 | user->links = xs_json_load(f); | ||
| 243 | fclose(f); | ||
| 244 | } | ||
| 236 | } | 245 | } |
| 237 | else | 246 | else |
| 238 | srv_debug(1, xs_fmt("invalid user '%s'", uid)); | 247 | srv_debug(1, xs_fmt("invalid user '%s'", uid)); |