summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-02-16 06:06:12 +0100
committerdefault <nobody@localhost>2024-02-16 06:06:12 +0100
commit0ede5e8b800d8407358f5992d04910bfa5480f24 (patch)
tree14e0083f4255b101bad24ebbb0f42c9b3aa63841 /utils.c
parent2da394aef4c8945d327f53376cf6f645c4bfe590 (diff)
Fixed crash in verify_links().
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/utils.c b/utils.c
index d7e9dd5..31ab63c 100644
--- a/utils.c
+++ b/utils.c
@@ -447,7 +447,7 @@ void verify_links(snac *user)
char *ll;
int vfied = 0;
- while (xs_list_iter(&lp, &ll)) {
+ while (!vfied && xs_list_iter(&lp, &ll)) {
/* extract href and rel */
xs *r = xs_regex_select(ll, "(href|rel) *= *(\"[^\"]*\"|'[^']*')");
@@ -493,11 +493,12 @@ void verify_links(snac *user)
/* got it! */
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);
vfied = 1;
-
- break;
}
else
snac_debug(user, 1,