From 619f772459ac12b6e91bbbdbb189b6c9580e8232 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 11 Jan 2002 11:43:35 +0000 Subject: [PATCH] listener monitor --- servers/slapd/back-monitor/Makefile.in | 4 ++-- servers/slapd/back-monitor/init.c | 4 ++-- servers/slapd/back-monitor/proto-back-monitor.h | 5 +++++ servers/slapd/daemon.c | 4 ++++ servers/slapd/proto-slap.h | 3 ++- servers/slapd/tools/mimic.c | 6 ++++++ 6 files changed, 21 insertions(+), 5 deletions(-) diff --git a/servers/slapd/back-monitor/Makefile.in b/servers/slapd/back-monitor/Makefile.in index 630b1903f0..d7cd5e6944 100644 --- a/servers/slapd/back-monitor/Makefile.in +++ b/servers/slapd/back-monitor/Makefile.in @@ -4,12 +4,12 @@ SRCS = init.c search.c compare.c modify.c bind.c \ operational.c \ cache.c entry.c \ backend.c database.c thread.c conn.c rww.c log.c \ - operation.c sent.c + operation.c sent.c listener.c OBJS = init.lo search.lo compare.lo modify.lo bind.lo \ operational.lo \ cache.lo entry.lo \ backend.lo database.lo thread.lo conn.lo rww.lo log.lo \ - operation.lo sent.lo + operation.lo sent.lo listener.lo LDAP_INCDIR= ../../../include LDAP_LIBDIR= ../../../libraries diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index 6841175b18..415512901d 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -52,8 +52,8 @@ struct monitorsubsys monitor_subsys[] = { { SLAPD_MONITOR_LISTENER, SLAPD_MONITOR_LISTENER_NAME, { 0L, NULL }, { 0L, NULL }, { 0L, NULL }, - MONITOR_F_NONE, - NULL, /* init */ + MONITOR_F_PERSISTENT_CH, + monitor_subsys_listener_init, NULL, /* update */ NULL, /* create */ NULL /* modify */ diff --git a/servers/slapd/back-monitor/proto-back-monitor.h b/servers/slapd/back-monitor/proto-back-monitor.h index cb630e4db1..34c66b769f 100644 --- a/servers/slapd/back-monitor/proto-back-monitor.h +++ b/servers/slapd/back-monitor/proto-back-monitor.h @@ -95,6 +95,11 @@ int monitor_subsys_ops_update LDAP_P(( struct monitorinfo *mi, Entry *e )); int monitor_subsys_sent_init LDAP_P(( BackendDB *be )); int monitor_subsys_sent_update LDAP_P(( struct monitorinfo *mi, Entry *e )); +/* + * listener + */ +int monitor_subsys_listener_init LDAP_P(( BackendDB *be )); + LDAP_END_DECL #endif diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index ce74a7bd08..25d6ddf861 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -1820,3 +1820,7 @@ slap_sig_wake( int sig ) void slapd_add_internal(ber_socket_t s) { slapd_add(s); } + +Listener ** slapd_get_listeners(void) { + return slap_listeners; +} diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index 303f950b30..361ddc1afc 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -1032,6 +1032,7 @@ LDAP_SLAPD_F (void) slapd_add_internal(ber_socket_t s); LDAP_SLAPD_F (int) slapd_daemon_init( const char *urls ); LDAP_SLAPD_F (int) slapd_daemon_destroy(void); LDAP_SLAPD_F (int) slapd_daemon(void); +LDAP_SLAPD_F (Listener **) slapd_get_listeners LDAP_P((void)); LDAP_SLAPD_F (void) slapd_set_write LDAP_P((ber_socket_t s, int wake)); LDAP_SLAPD_F (void) slapd_clr_write LDAP_P((ber_socket_t s, int wake)); @@ -1064,7 +1065,7 @@ LDAP_SLAPD_F (int) do_extended LDAP_P((Connection *conn, Operation *op)); LDAP_SLAPD_V (ber_socket_t) dtblsize; -LDAP_SLAPD_V (Listener **) slap_listeners; + LDAP_END_DECL diff --git a/servers/slapd/tools/mimic.c b/servers/slapd/tools/mimic.c index ab6519d447..f76da95187 100644 --- a/servers/slapd/tools/mimic.c +++ b/servers/slapd/tools/mimic.c @@ -239,3 +239,9 @@ slap_operational_hasSubordinate( int hs ) return NULL; } +Listener ** +slapd_get_listeners(void) +{ + return NULL; +} + -- 2.39.5