diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2014-04-29 10:56:38 +1200 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2014-04-29 10:56:38 +1200 |
commit | 1f1da1748765bd95410cb2126576ca2138582531 (patch) | |
tree | 8feb0d2251675516bdf02bb0d8ba6a804bac42ea /liblightdm-gobject | |
parent | 2a6a03316d2260d893396b94297574a5593cee90 (diff) | |
download | lightdm-1f1da1748765bd95410cb2126576ca2138582531.tar.gz |
Fix up some coding style errors in liblightdm-gobject
Diffstat (limited to 'liblightdm-gobject')
-rw-r--r-- | liblightdm-gobject/greeter.c | 61 |
1 files changed, 37 insertions, 24 deletions
diff --git a/liblightdm-gobject/greeter.c b/liblightdm-gobject/greeter.c index fe67fc4a..d02890cd 100644 --- a/liblightdm-gobject/greeter.c +++ b/liblightdm-gobject/greeter.c @@ -47,21 +47,38 @@ static guint signals[LAST_SIGNAL] = { 0 }; typedef struct { + /* TRUE if the daemon can reuse this greeter */ gboolean resettable; - gboolean connected; - GIOChannel *to_server_channel, *from_server_channel; + /* Channel to write to daemon */ + GIOChannel *to_server_channel; + + /* Channel to read from daemon */ + GIOChannel *from_server_channel; + + /* Data read from the daemon */ guint8 *read_buffer; gsize n_read; gsize n_responses_waiting; GList *responses_received; + /* TRUE if have got a connect response */ + gboolean connected; + + /* Pending connect requests */ GList *connect_requests; + + /* Pending start session requests */ GList *start_session_requests; + + /* Pending ensure shared data dir requests */ GList *ensure_shared_data_dir_requests; + /* Hints provided by the daemon */ GHashTable *hints; + + /* Timeout source to notify greeter to autologin */ guint autologin_timeout; gchar *authentication_user; @@ -128,7 +145,7 @@ G_DEFINE_TYPE (Request, request, G_TYPE_OBJECT); * Return value: the new #LightDMGreeter **/ LightDMGreeter * -lightdm_greeter_new () +lightdm_greeter_new (void) { return g_object_new (LIGHTDM_TYPE_GREETER, NULL); } @@ -1130,27 +1147,23 @@ lightdm_greeter_respond (LightDMGreeter *greeter, const gchar *response) if (priv->n_responses_waiting == 0) { - guint32 msg_length; - GList *iter; - - g_debug ("Providing response to display manager"); - - msg_length = int_length (); - for (iter = priv->responses_received; iter; iter = iter->next) - { - msg_length += string_length ((gchar *)iter->data); - } - - write_header (message, MAX_MESSAGE_LENGTH, GREETER_MESSAGE_CONTINUE_AUTHENTICATION, msg_length, &offset); - write_int (message, MAX_MESSAGE_LENGTH, g_list_length (priv->responses_received), &offset); - for (iter = priv->responses_received; iter; iter = iter->next) - { - write_string (message, MAX_MESSAGE_LENGTH, (gchar *)iter->data, &offset); - } - write_message (greeter, message, offset); - - g_list_free_full (priv->responses_received, g_free); - priv->responses_received = NULL; + guint32 msg_length; + GList *iter; + + g_debug ("Providing response to display manager"); + + msg_length = int_length (); + for (iter = priv->responses_received; iter; iter = iter->next) + msg_length += string_length ((gchar *)iter->data); + + write_header (message, MAX_MESSAGE_LENGTH, GREETER_MESSAGE_CONTINUE_AUTHENTICATION, msg_length, &offset); + write_int (message, MAX_MESSAGE_LENGTH, g_list_length (priv->responses_received), &offset); + for (iter = priv->responses_received; iter; iter = iter->next) + write_string (message, MAX_MESSAGE_LENGTH, (gchar *)iter->data, &offset); + write_message (greeter, message, offset); + + g_list_free_full (priv->responses_received, g_free); + priv->responses_received = NULL; } } |