X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=blobdiff_plain;f=tr%2Ftr_mon.c;h=8138198cfed341ce114e9afad989b018a1ce0f44;hp=f96d0edfc9bb3d9951408e3378018a72866451d2;hb=3b59db3c5565b707e745d58f7ec1df1bdc7c1895;hpb=1a3ad555c6b58de28efb85e7ab07c2f35208ab0d diff --git a/tr/tr_mon.c b/tr/tr_mon.c index f96d0ed..8138198 100644 --- a/tr/tr_mon.c +++ b/tr/tr_mon.c @@ -37,6 +37,7 @@ #include #include #include +#include /* * Cookie for the event handling callback @@ -128,7 +129,10 @@ static int tr_mons_auth_handler(gss_name_t client_name, TR_NAME *gss_name, void * @param mons_ev monitoring interface event instance * @return 0 on success, nonzero on failure. * */ -int tr_mon_event_init(struct event_base *base, MONS_INSTANCE *mons, TR_CFG_MGR *cfg_mgr, struct tr_socket_event *mons_ev) +int tr_mons_event_init(struct event_base *base, + MONS_INSTANCE *mons, + TR_CFG_MGR *cfg_mgr, + struct tr_socket_event *mons_ev) { TALLOC_CTX *tmp_ctx=talloc_new(NULL); struct tr_mons_event_cookie *cookie=NULL; @@ -154,12 +158,11 @@ int tr_mon_event_init(struct event_base *base, MONS_INSTANCE *mons, TR_CFG_MGR * talloc_steal(mons, cookie); /* get a monitoring interface listener */ - mons_ev->n_sock_fd = mons_get_listener(mons, - tr_mons_req_handler, + mons_ev->n_sock_fd = mons_get_listener(mons, tr_mons_req_handler, tr_mons_auth_handler, + cfg_mgr->active->internal->hostname, cfg_mgr->active->internal->monitoring_port, - (void *)cookie, - mons_ev->sock_fd, + (void *) cookie, mons_ev->sock_fd, TR_MAX_SOCKETS); if (mons_ev->n_sock_fd==0) { tr_crit("Error opening monitoring interface socket.");