Lines Matching refs:mdep
877 struct module_dep *mdep = (struct module_dep *)(void *)dep;
882 if (mdep->path == NULL) {
884 TAILQ_FOREACH(mdep->m, &lmodules, link)
885 if (strcmp(mdep->m->section,
886 mdep->section) == 0)
888 if (mdep->m == NULL)
896 if ((mdep->m = lm_load(mdep->path, mdep->section)) == NULL) {
904 if (mdep->path == NULL) {
909 lm_unload(mdep->m);
913 if (mdep->path == NULL) {
914 if (mdep->m != NULL && ctx->code == SNMP_RET_OK)
915 lm_unload(mdep->m);
917 if (mdep->m != NULL && ctx->code == SNMP_RET_OK &&
919 lm_start(mdep->m);
920 free(mdep->path);
935 struct module_dep *mdep;
1005 mdep = (struct module_dep *)(void *)snmp_dep_lookup(ctx,
1007 sizeof(*mdep), dep_modules);
1008 if (mdep == NULL) {
1013 if (mdep->section[0] != '\0') {
1019 strncpy(mdep->section, section, seclen);
1020 mdep->section[seclen] = '\0';
1024 mdep->path = NULL;
1026 if ((mdep->path = malloc(value->v.octetstring.len + 1)) == NULL)
1028 strncpy(mdep->path, value->v.octetstring.octets,
1030 mdep->path[value->v.octetstring.len] = '\0';
1032 ctx->scratch->ptr1 = mdep;