{
struct tr_mons_event_cookie *cookie=talloc_get_type_abort(cookie_in, struct tr_mons_event_cookie);
MONS_INSTANCE *mons = cookie->mons;
- TR_CFG_MGR *cfg_mgr = cookie->cfg_mgr;
- if ((!client_name) || (!gss_name) || (!mons) || (!cfg_mgr)) {
+ if ((!client_name) || (!gss_name) || (!mons)) {
tr_debug("tr_mons_gss_handler: Bad parameters.");
return -1;
}
goto cleanup;
}
+ if (cfg_mgr->active->internal->monitoring_port == 0) {
+ tr_notice("tr_mons_event_init: monitoring is disabled, not enabling events or opening sockets");
+ retval = 0;
+ goto cleanup;
+ }
+
/* Create the cookie for callbacks. We'll put it in the mons context, so it will
* be cleaned up when mons is freed by talloc_free. */
cookie=talloc(tmp_ctx, struct tr_mons_event_cookie);