summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2011-10-04 16:16:01 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2011-10-04 16:18:21 +0100
commitc23ca1a9ca5275e708326e5db5f762c52479845e (patch)
treeb7d38de8d98c65d63bfd2b2d35ebfd5c52e05646
parentc9907c9e7141acdda3cdf326db387f9c4c1b4abe (diff)
Connectivity: move upower-specific code inside ifdef
connectivity_monitor_set_awake() is only called by the code paths that listen to signals from upower, so passing --disable-upower to configure triggered a defined-but-not-used warning for it.
-rw-r--r--src/connectivity-monitor.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/connectivity-monitor.c b/src/connectivity-monitor.c
index 8ab03f7d..4ecccde2 100644
--- a/src/connectivity-monitor.c
+++ b/src/connectivity-monitor.c
@@ -111,14 +111,6 @@ connectivity_monitor_set_connected (
connectivity_monitor_change_states (self, connected, self->priv->awake);
}
-static void
-connectivity_monitor_set_awake (
- McdConnectivityMonitor *self,
- gboolean awake)
-{
- connectivity_monitor_change_states (self, self->priv->connected, awake);
-}
-
#ifdef HAVE_NM
#if !defined(NM_CHECK_VERSION)
@@ -214,6 +206,14 @@ connectivity_monitor_connman_check_state (McdConnectivityMonitor *connectivity_m
#ifdef HAVE_UPOWER
static void
+connectivity_monitor_set_awake (
+ McdConnectivityMonitor *self,
+ gboolean awake)
+{
+ connectivity_monitor_change_states (self, self->priv->connected, awake);
+}
+
+static void
notify_sleep_cb (
UpClient *upower_client,
UpSleepKind sleep_kind,