[gnome-online-accounts/wip/rishi/identity-kernel-keyring-notification: 1/4] kerberos-identity-manager: Rename two signal handlers for consistency



commit 10cd3e2922eff2210757dbdbc8519e352c86ea36
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jan 30 18:52:01 2020 +0100

    kerberos-identity-manager: Rename two signal handlers for consistency
    
    A subsequent commit will start using Linux's notification pipe for
    monitoring changes to Kerberos KEYRING credentials caches. Clarifying
    the names of the symbols used to implement the existing GFileMonitor
    and timeout GSource based mechanisms would make the code more readable.

 src/goaidentity/goakerberosidentitymanager.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/src/goaidentity/goakerberosidentitymanager.c b/src/goaidentity/goakerberosidentitymanager.c
index c35aa8b6..0765cb34 100644
--- a/src/goaidentity/goakerberosidentitymanager.c
+++ b/src/goaidentity/goakerberosidentitymanager.c
@@ -1311,17 +1311,17 @@ identity_manager_interface_init (GoaIdentityManagerInterface *interface)
 }
 
 static void
-on_credentials_cache_changed (GFileMonitor               *monitor,
-                              GFile                      *file,
-                              GFile                      *other_file,
-                              GFileMonitorEvent          *event_type,
-                              GoaKerberosIdentityManager *self)
+credentials_cache_file_monitor_changed (GFileMonitor               *monitor,
+                                        GFile                      *file,
+                                        GFile                      *other_file,
+                                        GFileMonitorEvent          *event_type,
+                                        GoaKerberosIdentityManager *self)
 {
   schedule_refresh (self);
 }
 
 static gboolean
-on_polling_timeout (GoaKerberosIdentityManager *self)
+credentials_cache_polling_timeout (GoaKerberosIdentityManager *self)
 {
   schedule_refresh (self);
 
@@ -1431,12 +1431,16 @@ monitor_credentials_cache (GoaKerberosIdentityManager  *self,
     }
   else
     {
-      g_signal_connect (G_OBJECT (monitor), "changed", G_CALLBACK (on_credentials_cache_changed), self);
+      g_signal_connect (G_OBJECT (monitor), "changed", G_CALLBACK (credentials_cache_file_monitor_changed), 
self);
       self->credentials_cache_monitor = monitor;
     }
 
   if (!can_monitor)
-    self->polling_timeout_id = g_timeout_add_seconds (FALLBACK_POLLING_INTERVAL, (GSourceFunc) 
on_polling_timeout, self);
+    {
+      self->polling_timeout_id = g_timeout_add_seconds (FALLBACK_POLLING_INTERVAL,
+                                                        (GSourceFunc) credentials_cache_polling_timeout,
+                                                        self);
+    }
 
   krb5_cc_close (self->kerberos_context, default_cache);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]