summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/monitor/monitor.c8
-rw-r--r--src/monitor/monitor.h7
-rw-r--r--src/monitor/monitor_netlink.c4
3 files changed, 5 insertions, 14 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 0e16b78f..4cd1e99d 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -154,15 +154,13 @@ static int mark_service_as_started(struct mt_svc *svc);
static int monitor_cleanup(void);
-static void network_status_change_cb(enum network_change state,
- void *cb_data)
+static void network_status_change_cb(void *cb_data)
{
struct mt_svc *iter;
struct mt_ctx *ctx = (struct mt_ctx *) cb_data;
- if (state != NL_ROUTE_UP) return;
-
- DEBUG(9, ("A new route has appeared, signaling providers to reset offline status\n"));
+ DEBUG(SSSDBG_TRACE_INTERNAL, ("A networking status change detected "
+ "signaling providers to reset offline status\n"));
for (iter = ctx->svc_list; iter; iter = iter->next) {
/* Don't signal services, only providers */
if (iter->provider) {
diff --git a/src/monitor/monitor.h b/src/monitor/monitor.h
index 73234424..ab23e005 100644
--- a/src/monitor/monitor.h
+++ b/src/monitor/monitor.h
@@ -43,12 +43,7 @@ int monitor_process_init(struct mt_ctx *ctx,
/* from monitor_netlink.c */
struct netlink_ctx;
-enum network_change {
- NL_ROUTE_UP,
- NL_ROUTE_DOWN
-};
-
-typedef void (*network_change_cb)(enum network_change, void *);
+typedef void (*network_change_cb)(void *);
int setup_netlink(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
network_change_cb change_cb, void *cb_data,
diff --git a/src/monitor/monitor_netlink.c b/src/monitor/monitor_netlink.c
index 33be7c85..cbf717fc 100644
--- a/src/monitor/monitor_netlink.c
+++ b/src/monitor/monitor_netlink.c
@@ -250,9 +250,7 @@ static void link_msg_handler(struct nl_object *obj, void *arg)
/* IFF_LOWER_UP is the indicator of carrier status */
if (flags & IFF_LOWER_UP) {
- ctx->change_cb(NL_ROUTE_UP, ctx->cb_data);
- } else {
- ctx->change_cb(NL_ROUTE_DOWN, ctx->cb_data);
+ ctx->change_cb(ctx->cb_data);
}
}