diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2014-06-25 12:42:30 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-07-08 20:38:30 +0200 |
commit | 149f40dc2d4ead57811c70b5028648ac83f6a1a7 (patch) | |
tree | 70d0e1fac656632b052d625e7dab823a8e914688 /src | |
parent | b76419cf8830440b46c20a15585562343c7b1924 (diff) | |
download | sssd-149f40dc2d4ead57811c70b5028648ac83f6a1a7.tar.gz sssd-149f40dc2d4ead57811c70b5028648ac83f6a1a7.tar.xz sssd-149f40dc2d4ead57811c70b5028648ac83f6a1a7.zip |
MONITOR: Signal InfoPipe to reconnect on SIGUSR2
When the monitor receives SIGUSR2, it also signals the IFP responder to
attempt to reconnect to the system bus using the sysbusReconnect SBUS
method. No action is taken by other responders.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/monitor/monitor.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 5e6eb37fd..5feba706a 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -759,6 +759,10 @@ static int service_signal_clear_enum_cache(struct mt_svc *svc) { return service_signal(svc, MON_CLI_IFACE_CLEARENUMCACHE); } +static int service_signal_sysbus_reconnect(struct mt_svc *svc) +{ + return service_signal(svc, MON_CLI_IFACE_SYSBUSRECONNECT); +} static int check_domain_ranges(struct sss_domain_info *domains) { @@ -1351,6 +1355,7 @@ static void monitor_hup(struct tevent_context *ev, if (!strcmp(SSS_AUTOFS_SBUS_SERVICE_NAME, cur_svc->name)) { service_signal_clear_enum_cache(cur_svc); } + } } @@ -1539,6 +1544,10 @@ static void signal_offline_reset(struct tevent_context *ev, if (cur_svc->provider) { service_signal_reset_offline(cur_svc); } + + if (strcmp(SSS_IFP_SBUS_SERVICE_NAME, cur_svc->name) == 0) { + service_signal_sysbus_reconnect(cur_svc); + } } signal_res_init(monitor); } |