X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=blobdiff_plain;f=tr%2Ftr_trp.c;h=ed276b0a7614588fd272fdf43740b7e2ba4ae513;hp=887372085a48f8c4bd3877b9a09abba435f3c277;hb=26e3e1459e76a542dbc33896e2e42cd09d2d9198;hpb=3b59db3c5565b707e745d58f7ec1df1bdc7c1895 diff --git a/tr/tr_trp.c b/tr/tr_trp.c index 8873720..ed276b0 100644 --- a/tr/tr_trp.c +++ b/tr/tr_trp.c @@ -47,7 +47,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -112,7 +114,7 @@ static int tr_trps_gss_handler(gss_name_t client_name, gss_buffer_t gss_name, tr_debug("tr_trps_gss_handler()"); - if ((!client_name) || (!gss_name) || (!trps) || (!cfg_mgr)) { + if ((!client_name) || (!trps) || (!cfg_mgr)) { tr_debug("tr_trps_gss_handler: Bad parameters."); return -1; } @@ -874,6 +876,20 @@ void tr_config_changed(TR_CFG *new_cfg, void *cookie) tr->tids->hostname = new_cfg->internal->hostname; tr->mons->hostname = new_cfg->internal->hostname; + /* Update the authorized monitoring gss names */ + if (tr->mons->authorized_gss_names) { + tr_debug("tr_config_changed: freeing tr->mons->authorized_gss_names"); + tr_gss_names_free(tr->mons->authorized_gss_names); + } + if (new_cfg->internal->monitoring_credentials != NULL) { + tr->mons->authorized_gss_names = tr_gss_names_dup(tr->mons, new_cfg->internal->monitoring_credentials); + } else { + tr->mons->authorized_gss_names = tr_gss_names_new(tr->mons); + } + if (tr->mons->authorized_gss_names == NULL) { + tr_err("tr_config_changed: Error configuring monitoring credentials"); + } + trps_set_connect_interval(trps, new_cfg->internal->trp_connect_interval); trps_set_update_interval(trps, new_cfg->internal->trp_update_interval); trps_set_sweep_interval(trps, new_cfg->internal->trp_sweep_interval);