mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Fixed crash in verify_links().
This commit is contained in:
parent
2da394aef4
commit
0ede5e8b80
1 changed files with 4 additions and 3 deletions
7
utils.c
7
utils.c
|
@ -447,7 +447,7 @@ void verify_links(snac *user)
|
||||||
char *ll;
|
char *ll;
|
||||||
int vfied = 0;
|
int vfied = 0;
|
||||||
|
|
||||||
while (xs_list_iter(&lp, &ll)) {
|
while (!vfied && xs_list_iter(&lp, &ll)) {
|
||||||
/* extract href and rel */
|
/* extract href and rel */
|
||||||
xs *r = xs_regex_select(ll, "(href|rel) *= *(\"[^\"]*\"|'[^']*')");
|
xs *r = xs_regex_select(ll, "(href|rel) *= *(\"[^\"]*\"|'[^']*')");
|
||||||
|
|
||||||
|
@ -493,11 +493,12 @@ void verify_links(snac *user)
|
||||||
/* got it! */
|
/* got it! */
|
||||||
xs *verified_at = xs_str_utctime(0, ISO_DATE_SPEC);
|
xs *verified_at = xs_str_utctime(0, ISO_DATE_SPEC);
|
||||||
|
|
||||||
|
if (user->links == NULL)
|
||||||
|
user->links = xs_dict_new();
|
||||||
|
|
||||||
user->links = xs_dict_set(user->links, v, verified_at);
|
user->links = xs_dict_set(user->links, v, verified_at);
|
||||||
|
|
||||||
vfied = 1;
|
vfied = 1;
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
snac_debug(user, 1,
|
snac_debug(user, 1,
|
||||||
|
|
Loading…
Reference in a new issue