summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-03-11 11:11:58 +0100
committerThomas Haller <thaller@redhat.com>2016-03-11 11:12:00 +0100
commit500bbbf7611efc079890cd9c71934fbb4853c355 (patch)
tree1a2f8d683df6c6e6757192c951e457ab289818ec
parentaed3c810b3681fa38000487f519660a338bc063e (diff)
downloadNetworkManager-500bbbf7611efc079890cd9c71934fbb4853c355.tar.gz
session-monitor/trivial: rename local functions for unique prefix
Don't use a "sd_" prefix for our local functions because then it's not immediately clear which functions are ours and which are from systemd-logind. Just rename them to have a "st_sd_*" prefix ("st" like "session tracking").
-rw-r--r--src/nm-session-monitor.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nm-session-monitor.c b/src/nm-session-monitor.c
index d8b046e653..467094270b 100644
--- a/src/nm-session-monitor.c
+++ b/src/nm-session-monitor.c
@@ -80,7 +80,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
#ifdef SESSION_TRACKING_SYSTEMD
static gboolean
-sd_session_exists (NMSessionMonitor *monitor, uid_t uid, gboolean active)
+st_sd_session_exists (NMSessionMonitor *monitor, uid_t uid, gboolean active)
{
int status;
@@ -97,7 +97,7 @@ sd_session_exists (NMSessionMonitor *monitor, uid_t uid, gboolean active)
}
static gboolean
-sd_changed (GIOChannel *stream, GIOCondition condition, gpointer user_data)
+st_sd_changed (GIOChannel *stream, GIOCondition condition, gpointer user_data)
{
NMSessionMonitor *monitor = user_data;
@@ -109,7 +109,7 @@ sd_changed (GIOChannel *stream, GIOCondition condition, gpointer user_data)
}
static void
-sd_init (NMSessionMonitor *monitor)
+st_sd_init (NMSessionMonitor *monitor)
{
int status;
GIOChannel *stream;
@@ -123,13 +123,13 @@ sd_init (NMSessionMonitor *monitor)
}
stream = g_io_channel_unix_new (sd_login_monitor_get_fd (monitor->sd.monitor));
- monitor->sd.watch = g_io_add_watch (stream, G_IO_IN, sd_changed, monitor);
+ monitor->sd.watch = g_io_add_watch (stream, G_IO_IN, st_sd_changed, monitor);
g_io_channel_unref (stream);
}
static void
-sd_finalize (NMSessionMonitor *monitor)
+st_sd_finalize (NMSessionMonitor *monitor)
{
g_clear_pointer (&monitor->sd.monitor, sd_login_monitor_unref);
g_source_remove (monitor->sd.watch);
@@ -383,7 +383,7 @@ nm_session_monitor_session_exists (NMSessionMonitor *self,
g_return_val_if_fail (NM_IS_SESSION_MONITOR (self), FALSE);
#ifdef SESSION_TRACKING_SYSTEMD
- if (sd_session_exists (self, uid, active))
+ if (st_sd_session_exists (self, uid, active))
return TRUE;
#endif
@@ -401,7 +401,7 @@ static void
nm_session_monitor_init (NMSessionMonitor *monitor)
{
#ifdef SESSION_TRACKING_SYSTEMD
- sd_init (monitor);
+ st_sd_init (monitor);
#endif
#ifdef SESSION_TRACKING_CONSOLEKIT
@@ -413,7 +413,7 @@ static void
nm_session_monitor_finalize (GObject *object)
{
#ifdef SESSION_TRACKING_SYSTEMD
- sd_finalize (NM_SESSION_MONITOR (object));
+ st_sd_finalize (NM_SESSION_MONITOR (object));
#endif
#ifdef SESSION_TRACKING_CONSOLEKIT