Lines Matching defs:nres
485 struct hast_resource *nres, *cres, *tres;
613 TAILQ_FOREACH(nres, &newcfg->hc_resources, hr_next) {
614 if (strcmp(cres->hr_name, nres->hr_name) == 0)
617 if (nres == NULL) {
627 TAILQ_FOREACH_SAFE(nres, &newcfg->hc_resources, hr_next, tres) {
629 if (strcmp(cres->hr_name, nres->hr_name) == 0)
633 TAILQ_REMOVE(&newcfg->hc_resources, nres, hr_next);
634 TAILQ_INSERT_TAIL(&cfg->hc_resources, nres, hr_next);
635 pjdlog_info("Resource %s added.", nres->hr_name);
660 TAILQ_FOREACH_SAFE(nres, &newcfg->hc_resources, hr_next, tres) {
662 if (strcmp(cres->hr_name, nres->hr_name) == 0)
666 if (resource_needs_restart(cres, nres)) {
673 TAILQ_REMOVE(&newcfg->hc_resources, nres, hr_next);
674 TAILQ_INSERT_TAIL(&cfg->hc_resources, nres, hr_next);
675 control_set_role(nres, role);
676 } else if (resource_needs_reload(cres, nres)) {
679 strlcpy(cres->hr_remoteaddr, nres->hr_remoteaddr,
681 strlcpy(cres->hr_sourceaddr, nres->hr_sourceaddr,
683 cres->hr_replication = nres->hr_replication;
684 cres->hr_checksum = nres->hr_checksum;
685 cres->hr_compression = nres->hr_compression;
686 cres->hr_timeout = nres->hr_timeout;
687 strlcpy(cres->hr_exec, nres->hr_exec,
689 cres->hr_metaflush = nres->hr_metaflush;