Lines Matching refs:link
360 struct hashinfo *link = NULL; in certhash_addlink() local
362 if ((link = hashinfo(NULL, hi->hash, hi->fingerprint)) == NULL) in certhash_addlink()
365 if ((link->filename = hashinfo_linkname(hi)) == NULL) in certhash_addlink()
368 link->reference = hi; in certhash_addlink()
369 link->changed = 1; in certhash_addlink()
370 *links = hashinfo_chain(*links, link); in certhash_addlink()
371 hi->reference = link; in certhash_addlink()
376 hashinfo_free(link); in certhash_addlink()
383 struct hashinfo *link; in certhash_findlink() local
385 for (link = links; link != NULL; link = link->next) { in certhash_findlink()
386 if (link->is_crl == hi->is_crl && in certhash_findlink()
387 link->hash == hi->hash && in certhash_findlink()
388 link->index == hi->index && in certhash_findlink()
389 link->reference == NULL) { in certhash_findlink()
390 link->reference = hi; in certhash_findlink()
391 if (link->target == NULL || in certhash_findlink()
392 strcmp(link->target, hi->filename) != 0) in certhash_findlink()
393 link->changed = 1; in certhash_findlink()
394 hi->reference = link; in certhash_findlink()
562 struct hashinfo *links = NULL, *certs = NULL, *crls = NULL, *link; in certhash_directory() local
593 for (link = links; link != NULL; link = link->next) { in certhash_directory()
594 if (link->exists == 0 || in certhash_directory()
595 (link->reference != NULL && link->changed == 0)) in certhash_directory()
600 "removing"), link->filename, link->target); in certhash_directory()
603 if (unlink(link->filename) == -1) { in certhash_directory()
605 link->filename); in certhash_directory()
611 for (link = links; link != NULL; link = link->next) { in certhash_directory()
612 if (link->exists == 1 && link->changed == 0) in certhash_directory()
617 "creating"), link->filename, in certhash_directory()
618 link->reference->filename); in certhash_directory()
621 if (symlink(link->reference->filename, link->filename) == -1) { in certhash_directory()
623 link->filename, link->reference->filename); in certhash_directory()