summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesús González <jgonzalez@gdr-sistemas.com>2014-09-20 08:12:35 +0200
committerJesús González <jgonzalez@gdr-sistemas.com>2014-09-20 08:12:35 +0200
commit7788b7b73d7b7ddfce70427fa74a498d4fcf64c6 (patch)
tree3247754c6d19f2866a56e7c3d09f116beaee527e /src
parent9d525c3a86fa6871100060a067b91a207215bea1 (diff)
parent444f30cd26fdccb176f0c0a2d0461ab46d19369c (diff)
downloadlightdm-7788b7b73d7b7ddfce70427fa74a498d4fcf64c6.tar.gz
Merge from parent branch up to revision 2065
Diffstat (limited to 'src')
-rw-r--r--src/accounts.c2
-rw-r--r--src/accounts.h2
-rw-r--r--src/console-kit.h2
-rw-r--r--src/display-manager.c6
-rw-r--r--src/display-manager.h2
-rw-r--r--src/display-server.c2
-rw-r--r--src/display-server.h2
-rw-r--r--src/dm-tool.c22
-rw-r--r--src/greeter.c31
-rw-r--r--src/greeter.h2
-rw-r--r--src/guest-account.c10
-rw-r--r--src/guest-account.h2
-rw-r--r--src/lightdm-guest-session.c2
-rw-r--r--src/mir-server.c4
-rw-r--r--src/mir-server.h2
-rw-r--r--src/plymouth.c2
-rw-r--r--src/plymouth.h2
-rw-r--r--src/process.c24
-rw-r--r--src/process.h2
-rw-r--r--src/seat-unity.c23
-rw-r--r--src/seat-xdmcp-session.c2
-rw-r--r--src/seat-xdmcp-session.h2
-rw-r--r--src/seat-xlocal.c29
-rw-r--r--src/seat-xlocal.h2
-rw-r--r--src/seat-xremote.c4
-rw-r--r--src/seat-xremote.h2
-rw-r--r--src/seat-xvnc.c4
-rw-r--r--src/seat-xvnc.h2
-rw-r--r--src/session-child.c16
-rw-r--r--src/session-child.h2
-rw-r--r--src/session-config.h2
-rw-r--r--src/shared-data-manager.c6
-rw-r--r--src/shared-data-manager.h2
-rw-r--r--src/unity-system-compositor.c10
-rw-r--r--src/unity-system-compositor.h2
-rw-r--r--src/vnc-server.c18
-rw-r--r--src/vnc-server.h2
-rw-r--r--src/vt.c8
-rw-r--r--src/vt.h2
-rw-r--r--src/x-authority.c14
-rw-r--r--src/x-authority.h4
-rw-r--r--src/x-server-local.c20
-rw-r--r--src/x-server-local.h2
-rw-r--r--src/x-server-remote.c2
-rw-r--r--src/x-server-remote.h2
-rw-r--r--src/x-server-xvnc.c10
-rw-r--r--src/x-server-xvnc.h2
-rw-r--r--src/x-server.c10
-rw-r--r--src/x-server.h2
-rw-r--r--src/xdmcp-protocol.c14
-rw-r--r--src/xdmcp-protocol.h4
-rw-r--r--src/xdmcp-server.c28
-rw-r--r--src/xdmcp-server.h2
-rw-r--r--src/xdmcp-session-private.h4
-rw-r--r--src/xdmcp-session.c6
-rw-r--r--src/xdmcp-session.h2
56 files changed, 202 insertions, 189 deletions
diff --git a/src/accounts.c b/src/accounts.c
index 797b6d9d..d4d54a2e 100644
--- a/src/accounts.c
+++ b/src/accounts.c
@@ -2,7 +2,7 @@
*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/accounts.h b/src/accounts.h
index a6468570..ba77c0ff 100644
--- a/src/accounts.h
+++ b/src/accounts.h
@@ -2,7 +2,7 @@
*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/console-kit.h b/src/console-kit.h
index 37252447..1080338e 100644
--- a/src/console-kit.h
+++ b/src/console-kit.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/display-manager.c b/src/display-manager.c
index 05c46bb0..bf8d24ae 100644
--- a/src/display-manager.c
+++ b/src/display-manager.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -125,7 +125,7 @@ display_manager_start (DisplayManager *manager)
/* Disable Plymouth if no X servers are replacing it */
if (plymouth_get_is_active ())
{
- g_debug ("Stopping Plymouth, no displays replace it");
+ g_debug ("Stopping Plymouth, no displays replace it");
plymouth_quit (FALSE);
}
}
@@ -155,7 +155,7 @@ display_manager_stop (DisplayManager *manager)
check_stopped (manager);
}
-
+
static void
display_manager_init (DisplayManager *manager)
{
diff --git a/src/display-manager.h b/src/display-manager.h
index 48ba01f2..c4b7d939 100644
--- a/src/display-manager.h
+++ b/src/display-manager.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/display-server.c b/src/display-server.c
index ddc476e2..19098d2c 100644
--- a/src/display-server.c
+++ b/src/display-server.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/display-server.h b/src/display-server.h
index 971151b3..c31d096e 100644
--- a/src/display-server.h
+++ b/src/display-server.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/dm-tool.c b/src/dm-tool.c
index c0d257c5..fd9d57ea 100644
--- a/src/dm-tool.c
+++ b/src/dm-tool.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -76,7 +76,7 @@ get_seat_proxy (void)
if (seat_proxy)
return seat_proxy;
-
+
if (!g_getenv ("XDG_SEAT_PATH"))
{
g_printerr ("Not running inside a display manager, XDG_SEAT_PATH not defined\n");
@@ -97,7 +97,7 @@ get_seat_proxy (void)
exit (EXIT_FAILURE);
}
g_clear_error (&error);
-
+
return seat_proxy;
}
@@ -120,7 +120,7 @@ main (int argc, char **argv)
if (!g_str_has_prefix (arg, "-"))
break;
-
+
if (strcmp (arg, "-h") == 0 || strcmp (arg, "--help") == 0)
{
g_printerr ("Usage:\n"
@@ -179,7 +179,7 @@ main (int argc, char **argv)
return EXIT_FAILURE;
}
g_clear_error (&error);
-
+
command = argv[arg_index];
arg_index++;
n_options = argc - arg_index;
@@ -429,7 +429,7 @@ main (int argc, char **argv)
lock_name = g_strdup_printf ("/tmp/.X%d-lock", xephyr_display_number);
has_lock = g_file_test (lock_name, G_FILE_TEST_EXISTS);
g_free (lock_name);
-
+
if (has_lock)
xephyr_display_number++;
else
@@ -445,11 +445,11 @@ main (int argc, char **argv)
}
else if (strcmp (dimensions, "fullscreen") == 0)
{
- xephyr_command = g_strdup_printf ("Xephyr :%d -fullscreen", xephyr_display_number);
+ xephyr_command = g_strdup_printf ("Xephyr :%d -fullscreen", xephyr_display_number);
}
else
{
- xephyr_command = g_strdup_printf ("Xephyr :%d -screen %s", xephyr_display_number, dimensions);
+ xephyr_command = g_strdup_printf ("Xephyr :%d -screen %s", xephyr_display_number, dimensions);
}
if (!g_shell_parse_argv (xephyr_command, NULL, &xephyr_argv, &error) ||
!g_spawn_async (NULL, xephyr_argv, NULL,
@@ -503,7 +503,7 @@ main (int argc, char **argv)
g_variant_get (result, "(&o)", &path);
g_print ("%s\n", path);
- return EXIT_SUCCESS;
+ return EXIT_SUCCESS;
}
else if (strcmp (command, "add-seat") == 0)
{
@@ -521,7 +521,7 @@ main (int argc, char **argv)
type = options[0];
properties = g_variant_builder_new (G_VARIANT_TYPE ("a(ss)"));
-
+
for (i = 1; i < n_options; i++)
{
gchar *property, *name, *value;
@@ -540,7 +540,7 @@ main (int argc, char **argv)
g_variant_builder_add_value (properties, g_variant_new ("(ss)", name, value));
g_free (property);
}
-
+
result = g_dbus_proxy_call_sync (dm_proxy,
"AddSeat",
g_variant_new ("(sa(ss))", type, properties),
diff --git a/src/greeter.c b/src/greeter.c
index bfc77094..980fa8eb 100644
--- a/src/greeter.c
+++ b/src/greeter.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -44,11 +44,11 @@ struct GreeterPrivate
guint8 *read_buffer;
gsize n_read;
gboolean use_secure_memory;
-
+
/* Hints for the greeter */
GHashTable *hints;
- /* Default session to use */
+ /* Default session to use */
gchar *default_session;
/* Sequence number of current PAM session */
@@ -226,7 +226,7 @@ static void
write_string (guint8 *buffer, gint buffer_length, const gchar *value, gsize *offset)
{
gint length;
-
+
if (value)
length = strlen (value);
else
@@ -307,7 +307,7 @@ pam_messages_cb (Session *session, Greeter *greeter)
size = int_length () + string_length (session_get_username (session)) + int_length ();
for (i = 0; i < messages_length; i++)
size += int_length () + string_length (messages[i].msg);
-
+
write_header (message, MAX_MESSAGE_LENGTH, SERVER_MESSAGE_PROMPT_AUTHENTICATION, size, &offset);
write_int (message, MAX_MESSAGE_LENGTH, greeter->priv->authentication_sequence_number, &offset);
write_string (message, MAX_MESSAGE_LENGTH, session_get_username (session), &offset);
@@ -343,7 +343,7 @@ send_end_authentication (Greeter *greeter, guint32 sequence_number, const gchar
write_int (message, MAX_MESSAGE_LENGTH, sequence_number, &offset);
write_string (message, MAX_MESSAGE_LENGTH, username, &offset);
write_int (message, MAX_MESSAGE_LENGTH, result, &offset);
- write_message (greeter, message, offset);
+ write_message (greeter, message, offset);
}
void
@@ -484,7 +484,7 @@ handle_login_as_guest (Greeter *greeter, guint32 sequence_number)
return;
}
- greeter->priv->guest_account_authenticated = TRUE;
+ greeter->priv->guest_account_authenticated = TRUE;
send_end_authentication (greeter, sequence_number, "", PAM_SUCCESS);
}
@@ -801,7 +801,7 @@ read_cb (GIOChannel *source, GIOCondition condition, gpointer data)
greeter->priv->from_greeter_watch = 0;
return FALSE;
}
-
+
n_to_read = HEADER_SIZE;
if (greeter->priv->n_read >= HEADER_SIZE)
{
@@ -837,9 +837,9 @@ read_cb (GIOChannel *source, GIOCondition condition, gpointer data)
greeter->priv->read_buffer = secure_realloc (greeter, greeter->priv->read_buffer, n_to_read);
read_cb (source, condition, greeter);
return TRUE;
- }
+ }
}
-
+
offset = 0;
id = read_int (greeter, &offset);
length = HEADER_SIZE + read_int (greeter, &offset);
@@ -956,6 +956,7 @@ greeter_start (Session *session)
int to_greeter_pipe[2], from_greeter_pipe[2];
gboolean result = FALSE;
gchar *value;
+ GError *error = NULL;
/* Create a pipe to talk with the greeter */
if (pipe (to_greeter_pipe) != 0 || pipe (from_greeter_pipe) != 0)
@@ -964,9 +965,15 @@ greeter_start (Session *session)
return FALSE;
}
greeter->priv->to_greeter_channel = g_io_channel_unix_new (to_greeter_pipe[1]);
- g_io_channel_set_encoding (greeter->priv->to_greeter_channel, NULL, NULL);
+ g_io_channel_set_encoding (greeter->priv->to_greeter_channel, NULL, &error);
+ if (error)
+ g_warning ("Failed to set encoding on to greeter channel to binary: %s\n", error->message);
+ g_clear_error (&error);
greeter->priv->from_greeter_channel = g_io_channel_unix_new (from_greeter_pipe[0]);
- g_io_channel_set_encoding (greeter->priv->from_greeter_channel, NULL, NULL);
+ g_io_channel_set_encoding (greeter->priv->from_greeter_channel, NULL, &error);
+ if (error)
+ g_warning ("Failed to set encoding on from greeter channel to binary: %s\n", error->message);
+ g_clear_error (&error);
g_io_channel_set_buffered (greeter->priv->from_greeter_channel, FALSE);
greeter->priv->from_greeter_watch = g_io_add_watch (greeter->priv->from_greeter_channel, G_IO_IN | G_IO_HUP, read_cb, greeter);
diff --git a/src/greeter.h b/src/greeter.h
index 3aa126d6..47929ac1 100644
--- a/src/greeter.h
+++ b/src/greeter.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/guest-account.c b/src/guest-account.c
index 14cd87c5..77c4594b 100644
--- a/src/guest-account.c
+++ b/src/guest-account.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -20,7 +20,7 @@ get_setup_script (void)
{
gchar *script;
static gchar *setup_script = NULL;
-
+
if (setup_script)
return setup_script;
@@ -30,7 +30,7 @@ get_setup_script (void)
setup_script = g_find_program_in_path (script);
g_free (script);
-
+
return setup_script;
}
@@ -55,7 +55,7 @@ run_script (const gchar *script, gchar **stdout_text, gint *exit_status, GError
NULL, NULL,
stdout_text, NULL, exit_status, error);
g_strfreev (argv);
-
+
return result;
}
@@ -98,7 +98,7 @@ guest_account_setup (void)
g_debug ("Guest account setup script didn't return a username");
return NULL;
}
-
+
g_debug ("Guest account %s setup", username);
return username;
diff --git a/src/guest-account.h b/src/guest-account.h
index 70f900da..9de60fdc 100644
--- a/src/guest-account.h
+++ b/src/guest-account.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/lightdm-guest-session.c b/src/lightdm-guest-session.c
index 6897a65a..8f2552e2 100644
--- a/src/lightdm-guest-session.c
+++ b/src/lightdm-guest-session.c
@@ -2,7 +2,7 @@
*
* Copyright (C) 2011 Canonical Ltd.
* Author: Martin Pitt <martin.pitt@ubuntu.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/mir-server.c b/src/mir-server.c
index 69a492d6..36e0e770 100644
--- a/src/mir-server.c
+++ b/src/mir-server.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -28,7 +28,7 @@ G_DEFINE_TYPE (MirServer, mir_server, DISPLAY_SERVER_TYPE);
MirServer *mir_server_new (void)
{
- return g_object_new (MIR_SERVER_TYPE, NULL);
+ return g_object_new (MIR_SERVER_TYPE, NULL);
}
void
diff --git a/src/mir-server.h b/src/mir-server.h
index 3e7bc0bb..4f59623f 100644
--- a/src/mir-server.h
+++ b/src/mir-server.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/plymouth.c b/src/plymouth.c
index aefb81a9..03b31127 100644
--- a/src/plymouth.c
+++ b/src/plymouth.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/plymouth.h b/src/plymouth.h
index f8f90f6f..e8277b20 100644
--- a/src/plymouth.h
+++ b/src/plymouth.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/process.c b/src/process.c
index 4328dcd0..adb06f78 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -24,7 +24,7 @@
enum {
GOT_DATA,
- GOT_SIGNAL,
+ GOT_SIGNAL,
STOPPED,
LAST_SIGNAL
};
@@ -51,7 +51,7 @@ struct ProcessPrivate
/* Process ID */
GPid pid;
-
+
/* Exit status of process */
int exit_status;
@@ -121,7 +121,7 @@ process_set_env (Process *process, const gchar *name, const gchar *value)
{
g_return_if_fail (process != NULL);
g_return_if_fail (name != NULL);
- g_hash_table_insert (process->priv->env, g_strdup (name), g_strdup (value));
+ g_hash_table_insert (process->priv->env, g_strdup (name), g_strdup (value));
}
const gchar *
@@ -163,7 +163,7 @@ process_watch_cb (GPid pid, gint status, gpointer data)
if (process->priv->quit_timeout)
g_source_remove (process->priv->quit_timeout);
- process->priv->quit_timeout = 0;
+ process->priv->quit_timeout = 0;
process->priv->pid = 0;
g_hash_table_remove (processes, GINT_TO_POINTER (pid));
@@ -183,7 +183,7 @@ process_start (Process *process, gboolean block)
GError *error = NULL;
g_return_val_if_fail (process != NULL, FALSE);
- g_return_val_if_fail (process->priv->command != NULL, FALSE);
+ g_return_val_if_fail (process->priv->command != NULL, FALSE);
g_return_val_if_fail (process->priv->pid == 0, FALSE);
if (!g_shell_parse_argv (process->priv->command, &argc, &argv, &error))
@@ -244,11 +244,11 @@ process_start (Process *process, gboolean block)
#endif
for (i = 0; i < env_length; i++)
setenv (env_keys[i], env_values[i], TRUE);
-
+
execvp (argv[0], argv);
_exit (EXIT_FAILURE);
}
-
+
close (log_fd);
g_strfreev (argv);
g_free (env_keys);
@@ -269,7 +269,7 @@ process_start (Process *process, gboolean block)
int exit_status;
waitpid (process->priv->pid, &exit_status, 0);
process_watch_cb (process->priv->pid, exit_status, process);
- }
+ }
else
{
g_hash_table_insert (processes, GINT_TO_POINTER (process->priv->pid), g_object_ref (process));
@@ -402,7 +402,7 @@ handle_signal (GIOChannel *source, GIOCondition condition, gpointer data)
Process *process;
errno = 0;
- if (read (signal_pipe[0], &signo, sizeof (int)) != sizeof (int) ||
+ if (read (signal_pipe[0], &signo, sizeof (int)) != sizeof (int) ||
read (signal_pipe[0], &pid, sizeof (pid_t)) != sizeof (pid_t))
{
g_warning ("Error reading from signal pipe: %s", strerror (errno));
@@ -427,7 +427,7 @@ process_class_init (ProcessClass *klass)
struct sigaction action;
klass->stopped = process_stopped;
- object_class->finalize = process_finalize;
+ object_class->finalize = process_finalize;
g_type_class_add_private (klass, sizeof (ProcessPrivate));
@@ -438,7 +438,7 @@ process_class_init (ProcessClass *klass)
G_STRUCT_OFFSET (ProcessClass, got_data),
NULL, NULL,
NULL,
- G_TYPE_NONE, 0);
+ G_TYPE_NONE, 0);
signals[GOT_SIGNAL] =
g_signal_new ("got-signal",
G_TYPE_FROM_CLASS (klass),
diff --git a/src/process.h b/src/process.h
index 1fcde7a8..d15477b1 100644
--- a/src/process.h
+++ b/src/process.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/seat-unity.c b/src/seat-unity.c
index 98a0fa33..bc08437d 100644
--- a/src/seat-unity.c
+++ b/src/seat-unity.c
@@ -107,7 +107,7 @@ compositor_ready_cb (UnitySystemCompositor *compositor, SeatUnity *seat)
result = g_key_file_load_from_file (keys, path, G_KEY_FILE_NONE, &error);
if (error)
l_debug (seat, "Error getting key %s", error->message);
- g_clear_error (&error);
+ g_clear_error (&error);
if (result)
{
@@ -216,7 +216,7 @@ create_x_server (Seat *seat)
layout = seat_get_string_property (seat, "xserver-layout");
if (layout)
x_server_local_set_layout (x_server, layout);
-
+
x_server_local_set_xdg_seat (x_server, seat_get_name (seat));
config_file = seat_get_string_property (seat, "xserver-config");
@@ -242,9 +242,9 @@ create_mir_server (Seat *seat)
static DisplayServer *
seat_unity_create_display_server (Seat *seat, Session *session)
-{
+{
const gchar *session_type;
-
+
session_type = session_get_session_type (session);
if (strcmp (session_type, "x") == 0)
return DISPLAY_SERVER (create_x_server (seat));
@@ -380,13 +380,16 @@ seat_unity_set_next_session (Seat *seat, Session *session)
static void
seat_unity_run_script (Seat *seat, DisplayServer *display_server, Process *script)
{
- const gchar *path;
- XServerLocal *x_server;
+ if (IS_X_SERVER_LOCAL (display_server))
+ {
+ XServerLocal *x_server;
+ const gchar *path;
- x_server = X_SERVER_LOCAL (display_server);
- path = x_server_local_get_authority_file_path (x_server);
- process_set_env (script, "DISPLAY", x_server_get_address (X_SERVER (x_server)));
- process_set_env (script, "XAUTHORITY", path);
+ x_server = X_SERVER_LOCAL (display_server);
+ path = x_server_local_get_authority_file_path (x_server);
+ process_set_env (script, "DISPLAY", x_server_get_address (X_SERVER (x_server)));
+ process_set_env (script, "XAUTHORITY", path);
+ }
SEAT_CLASS (seat_unity_parent_class)->run_script (seat, display_server, script);
}
diff --git a/src/seat-xdmcp-session.c b/src/seat-xdmcp-session.c
index 5aebef9a..7621a97b 100644
--- a/src/seat-xdmcp-session.c
+++ b/src/seat-xdmcp-session.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/seat-xdmcp-session.h b/src/seat-xdmcp-session.h
index a72a09ce..5f244205 100644
--- a/src/seat-xdmcp-session.h
+++ b/src/seat-xdmcp-session.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/seat-xlocal.c b/src/seat-xlocal.c
index c5ef43a4..04a76982 100644
--- a/src/seat-xlocal.c
+++ b/src/seat-xlocal.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -51,7 +51,7 @@ xdmcp_x_server_stopped_cb (DisplayServer *display_server, Seat *seat)
g_signal_handlers_disconnect_matched (SEAT_XLOCAL (seat)->priv->xdmcp_x_server, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, seat);
SEAT_XLOCAL (seat)->priv->xdmcp_x_server = NULL;
g_object_unref (display_server);
-
+
if (seat_get_is_stopping (seat))
check_stopped (SEAT_XLOCAL (seat));
else
@@ -90,7 +90,7 @@ seat_xlocal_start (Seat *seat)
result = g_key_file_load_from_file (keys, path, G_KEY_FILE_NONE, &error);
if (error)
l_debug (seat, "Error getting key %s", error->message);
- g_clear_error (&error);
+ g_clear_error (&error);
if (result)
{
@@ -203,9 +203,9 @@ create_x_server (Seat *seat)
config_file = seat_get_string_property (seat, "xserver-config");
if (config_file)
x_server_local_set_config (x_server, config_file);
-
+
allow_tcp = seat_get_boolean_property (seat, "xserver-allow-tcp");
- x_server_local_set_allow_tcp (x_server, allow_tcp);
+ x_server_local_set_allow_tcp (x_server, allow_tcp);
return x_server;
}
@@ -232,7 +232,7 @@ create_unity_system_compositor (Seat *seat)
vt = get_vt (seat, DISPLAY_SERVER (compositor));
if (vt >= 0)
unity_system_compositor_set_vt (compositor, vt);
-
+
for (i = 0; ; i++)
{
socket_name = g_strdup_printf ("/run/lightdm-mir-%d", i);
@@ -266,7 +266,7 @@ seat_xlocal_create_display_server (Seat *seat, Session *session)
compositor_command = session_config_get_compositor_command (session_get_config (session));
if (compositor_command)
unity_system_compositor_set_command (UNITY_SYSTEM_COMPOSITOR (compositor), compositor_command);
-
+
return compositor;
}
else
@@ -341,13 +341,16 @@ seat_xlocal_get_active_session (Seat *seat)
static void
seat_xlocal_run_script (Seat *seat, DisplayServer *display_server, Process *script)
{
- const gchar *path;
- XServerLocal *x_server;
+ if (IS_X_SERVER_LOCAL (display_server))
+ {
+ const gchar *path;
+ XServerLocal *x_server;
- x_server = X_SERVER_LOCAL (display_server);
- path = x_server_local_get_authority_file_path (x_server);
- process_set_env (script, "DISPLAY", x_server_get_address (X_SERVER (x_server)));
- process_set_env (script, "XAUTHORITY", path);
+ x_server = X_SERVER_LOCAL (display_server);
+ path = x_server_local_get_authority_file_path (x_server);
+ process_set_env (script, "DISPLAY", x_server_get_address (X_SERVER (x_server)));
+ process_set_env (script, "XAUTHORITY", path);
+ }
SEAT_CLASS (seat_xlocal_parent_class)->run_script (seat, display_server, script);
}
diff --git a/src/seat-xlocal.h b/src/seat-xlocal.h
index 41fdb74f..c60ecdf4 100644
--- a/src/seat-xlocal.h
+++ b/src/seat-xlocal.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/seat-xremote.c b/src/seat-xremote.c
index d7af16aa..1a46f401 100644
--- a/src/seat-xremote.c
+++ b/src/seat-xremote.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -79,7 +79,7 @@ seat_xremote_run_script (Seat *seat, DisplayServer *display_server, Process *scr
XServerRemote *x_server;
x_server = X_SERVER_REMOTE (display_server);
- process_set_env (script, "DISPLAY", x_server_get_address (X_SERVER (x_server)));
+ process_set_env (script, "DISPLAY", x_server_get_address (X_SERVER (x_server)));
process_set_env (script, "REMOTE_HOST", x_server_get_hostname (X_SERVER (x_server)));
SEAT_CLASS (seat_xremote_parent_class)->run_script (seat, display_server, script);
diff --git a/src/seat-xremote.h b/src/seat-xremote.h
index dd96462d..2e14d36c 100644
--- a/src/seat-xremote.h
+++ b/src/seat-xremote.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/seat-xvnc.c b/src/seat-xvnc.c
index fa7737ec..00f5f693 100644
--- a/src/seat-xvnc.c
+++ b/src/seat-xvnc.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -41,7 +41,7 @@ seat_xvnc_create_display_server (Seat *seat, Session *session)
if (strcmp (session_get_session_type (session), "x") != 0)
return NULL;
-
+
x_server = x_server_xvnc_new ();
x_server_xvnc_set_socket (x_server, g_socket_get_fd (SEAT_XVNC (seat)->priv->connection));
diff --git a/src/seat-xvnc.h b/src/seat-xvnc.h
index 2e4c5291..f96e590a 100644
--- a/src/seat-xvnc.h
+++ b/src/seat-xvnc.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/session-child.c b/src/session-child.c
index 98a973c0..c6f8a7ce 100644
--- a/src/session-child.c
+++ b/src/session-child.c
@@ -67,7 +67,7 @@ read_data (void *buf, size_t count)
n_read = read (from_daemon_output, buf, count);
if (n_read < 0)
g_printerr ("Error reading from daemon: %s\n", strerror (errno));
-
+
return n_read;
}
@@ -86,10 +86,10 @@ read_string_full (void* (*alloc_fn)(size_t n))
g_printerr ("Invalid string length %d from daemon\n", length);
return NULL;
}
-
+
value = (*alloc_fn) (sizeof (char) * (length + 1));
read_data (value, length);
- value[length] = '\0';
+ value[length] = '\0';
return value;
}
@@ -216,7 +216,7 @@ updwtmpx (const gchar *wtmp_file, struct utmpx *ut)
strncpy (u.ut_host, ut->ut_host, sizeof (u.ut_host));
u.ut_tv.tv_sec = ut->ut_tv.tv_sec;
u.ut_tv.tv_usec = ut->ut_tv.tv_usec;
-
+
updwtmp (wtmp_file, &u);
}
@@ -329,7 +329,7 @@ session_child_run (int argc, char **argv)
pam_set_item (pam_handle, PAM_TTY, xdisplay);
}
else if (tty)
- pam_set_item (pam_handle, PAM_TTY, tty);
+ pam_set_item (pam_handle, PAM_TTY, tty);
#ifdef PAM_XAUTHDATA
if (x_authority)
@@ -457,7 +457,7 @@ session_child_run (int argc, char **argv)
if (version >= 1)
{
g_free (tty);
- tty = read_string ();
+ tty = read_string ();
}
x_authority_filename = read_string ();
if (version >= 1)
@@ -501,7 +501,7 @@ session_child_run (int argc, char **argv)
}
else
{
- fd = open ("/dev/null", O_WRONLY);
+ fd = open ("/dev/null", O_WRONLY);
dup2 (fd, STDERR_FILENO);
close (fd);
}
@@ -524,7 +524,7 @@ session_child_run (int argc, char **argv)
pam_end (pam_handle, 0);
return EXIT_FAILURE;
}
-
+
/* Open the session */
result = pam_open_session (pam_handle, 0);
if (result != PAM_SUCCESS)
diff --git a/src/session-child.h b/src/session-child.h
index 49d7051e..cf563941 100644
--- a/src/session-child.h
+++ b/src/session-child.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/session-config.h b/src/session-config.h
index 25e8002b..a86dc56d 100644
--- a/src/session-config.h
+++ b/src/session-config.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2013 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/shared-data-manager.c b/src/shared-data-manager.c
index c2892212..5b667647 100644
--- a/src/shared-data-manager.c
+++ b/src/shared-data-manager.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2014 Canonical, Ltd
* Author: Michael Terry <michael.terry@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -93,7 +93,7 @@ shared_data_manager_ensure_user_dir (SharedDataManager *manager, const gchar *us
entry = getpwnam (user);
if (!entry)
return NULL;
-
+
path = g_build_filename (USERS_DIR, user, NULL);
file = g_file_new_for_path (path);
@@ -107,7 +107,7 @@ shared_data_manager_ensure_user_dir (SharedDataManager *manager, const gchar *us
else
g_warning ("Could not create user data directory %s: %s", path, error->message);
}
- g_clear_error (&error);
+ g_clear_error (&error);
if (!result)
{
g_object_unref (file);
diff --git a/src/shared-data-manager.h b/src/shared-data-manager.h
index 763330c8..7b60e8f0 100644
--- a/src/shared-data-manager.h
+++ b/src/shared-data-manager.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2014 Canonical, Ltd
* Author: Michael Terry <michael.terry@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/unity-system-compositor.c b/src/unity-system-compositor.c
index 70c5d17a..40502557 100644
--- a/src/unity-system-compositor.c
+++ b/src/unity-system-compositor.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2013 Canonical Ltd.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -238,7 +238,7 @@ read_cb (GIOChannel *source, GIOCondition condition, gpointer data)
gsize n_to_read = 0;
guint16 id, payload_length;
/*guint8 *payload;*/
-
+
if (condition == G_IO_HUP)
{
l_debug (compositor, "Compositor closed communication channel");
@@ -459,7 +459,7 @@ unity_system_compositor_start (DisplayServer *server)
return TRUE;
}
-
+
static void
unity_system_compositor_stop (DisplayServer *server)
{
@@ -481,7 +481,7 @@ unity_system_compositor_finalize (GObject *object)
{
UnitySystemCompositor *self;
- self = UNITY_SYSTEM_COMPOSITOR (object);
+ self = UNITY_SYSTEM_COMPOSITOR (object);
if (self->priv->process)
{
@@ -497,7 +497,7 @@ unity_system_compositor_finalize (GObject *object)
close (self->priv->from_compositor_pipe[0]);
close (self->priv->from_compositor_pipe[1]);
g_io_channel_unref (self->priv->from_compositor_channel);
- if (self->priv->from_compositor_watch)
+ if (self->priv->from_compositor_watch)
g_source_remove (self->priv->from_compositor_watch);
g_free (self->priv->read_buffer);
if (self->priv->timeout_source)
diff --git a/src/unity-system-compositor.h b/src/unity-system-compositor.h
index 5354429d..cfd0d4d2 100644
--- a/src/unity-system-compositor.h
+++ b/src/unity-system-compositor.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2013 Canonical Ltd.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/vnc-server.c b/src/vnc-server.c
index b265e287..1755ffdb 100644
--- a/src/vnc-server.c
+++ b/src/vnc-server.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -82,7 +82,7 @@ open_tcp_socket (GSocketFamily family, guint port, GError **error)
{
GSocket *socket;
GSocketAddress *address;
-
+
socket = g_socket_new (family, G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_TCP, error);
if (!socket)
return NULL;
@@ -105,19 +105,19 @@ vnc_server_start (VNCServer *server)
GError *error = NULL;
g_return_val_if_fail (server != NULL, FALSE);
-
+
server->priv->socket = open_tcp_socket (G_SOCKET_FAMILY_IPV4, server->priv->port, &error);
if (error)
g_warning ("Failed to create IPv4 VNC socket: %s", error->message);
g_clear_error (&error);
-
+
if (server->priv->socket)
{
source = g_socket_create_source (server->priv->socket, G_IO_IN, NULL);
g_source_set_callback (source, (GSourceFunc) read_cb, server, NULL);
g_source_attach (source, NULL);
}
-
+
server->priv->socket6 = open_tcp_socket (G_SOCKET_FAMILY_IPV6, server->priv->port, &error);
if (error)
g_warning ("Failed to create IPv6 VNC socket: %s", error->message);
@@ -149,13 +149,13 @@ vnc_server_finalize (GObject *object)
VNCServer *self;
self = VNC_SERVER (object);
-
+
if (self->priv->socket)
g_object_unref (self->priv->socket);
if (self->priv->socket6)
g_object_unref (self->priv->socket6);
-
- G_OBJECT_CLASS (vnc_server_parent_class)->finalize (object);
+
+ G_OBJECT_CLASS (vnc_server_parent_class)->finalize (object);
}
static void
@@ -163,7 +163,7 @@ vnc_server_class_init (VNCServerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = vnc_server_finalize;
+ object_class->finalize = vnc_server_finalize;
g_type_class_add_private (klass, sizeof (VNCServerPrivate));
diff --git a/src/vnc-server.h b/src/vnc-server.h
index 83f01cbb..109dc904 100644
--- a/src/vnc-server.h
+++ b/src/vnc-server.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/vt.c b/src/vt.c
index fa0a0448..92158902 100644
--- a/src/vt.c
+++ b/src/vt.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -88,7 +88,7 @@ vt_set_active (gint number)
/* Pretend always active */
if (getuid () != 0)
- return;
+ return;
console_fd = open_console ();
if (console_fd >= 0)
@@ -147,7 +147,7 @@ vt_get_unused (void)
number = vt_get_min ();
while (vt_is_used (number))
number++;
-
+
return number;
}
@@ -155,7 +155,7 @@ void
vt_ref (gint number)
{
g_debug ("Using VT %d", number);
- used_vts = g_list_append (used_vts, GINT_TO_POINTER (number));
+ used_vts = g_list_append (used_vts, GINT_TO_POINTER (number));
}
void
diff --git a/src/vt.h b/src/vt.h
index f57ebb4d..a731beca 100644
--- a/src/vt.h
+++ b/src/vt.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/x-authority.c b/src/x-authority.c
index 1b18ab0e..25f66438 100644
--- a/src/x-authority.c
+++ b/src/x-authority.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -27,7 +27,7 @@ struct XAuthorityPrivate
/* Address of the X server (format dependent on family) */
guint8 *address;
gsize address_length;
-
+
/* Display number of X server */
gchar *number;
@@ -46,7 +46,7 @@ x_authority_new (guint16 family, const guint8 *address, gsize address_length, co
{
XAuthority *auth = g_object_new (X_AUTHORITY_TYPE, NULL);
- x_authority_set_family (auth, family);
+ x_authority_set_family (auth, family);
x_authority_set_address (auth, address, address_length);
x_authority_set_number (auth, number);
x_authority_set_authorization_name (auth, name);
@@ -60,7 +60,7 @@ x_authority_new_cookie (guint16 family, const guint8 *address, gsize address_len
{
guint8 cookie[16];
gint i;
-
+
for (i = 0; i < 16; i++)
cookie[i] = g_random_int () & 0xFF;
@@ -193,7 +193,7 @@ read_data (gchar *data, gsize data_length, gsize *offset, guint16 length, guint8
if (data_length - *offset < length)
return FALSE;
-
+
*value = g_malloc0 (length + 1);
for (i = 0; i < length; i++)
(*value)[i] = data[*offset + i];
@@ -360,7 +360,7 @@ x_authority_write (XAuthority *auth, XAuthWriteMode mode, const gchar *filename,
}
return TRUE;
-}
+}
static void
x_authority_init (XAuthority *auth)
@@ -381,7 +381,7 @@ x_authority_finalize (GObject *object)
g_free (self->priv->authorization_name);
g_free (self->priv->authorization_data);
- G_OBJECT_CLASS (x_authority_parent_class)->finalize (object);
+ G_OBJECT_CLASS (x_authority_parent_class)->finalize (object);
}
static void
diff --git a/src/x-authority.h b/src/x-authority.h
index d7dacb62..101cb1ca 100644
--- a/src/x-authority.h
+++ b/src/x-authority.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -47,7 +47,7 @@ typedef enum
{
XAUTH_WRITE_MODE_REPLACE,
XAUTH_WRITE_MODE_REMOVE,
- XAUTH_WRITE_MODE_SET
+ XAUTH_WRITE_MODE_SET
} XAuthWriteMode;
GType x_authority_get_type (void);
diff --git a/src/x-server-local.c b/src/x-server-local.c
index d908f2ad..3f58e0b7 100644
--- a/src/x-server-local.c
+++ b/src/x-server-local.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -36,7 +36,7 @@ struct XServerLocalPrivate
/* Server layout to use */
gchar *layout;
-
+
/* Value for -seat argument */
gchar *xdg_seat;
@@ -113,7 +113,7 @@ display_number_in_use (guint display_number)
}
g_free (path);
-
+
return in_use;
}
@@ -289,7 +289,7 @@ x_server_local_set_mir_id (XServerLocal *server, const gchar *id)
const gchar *x_server_local_get_mir_id (XServerLocal *server)
{
g_return_val_if_fail (server != NULL, NULL);
- return server->priv->mir_id;
+ return server->priv->mir_id;
}
void
@@ -376,7 +376,7 @@ stopped_cb (Process *process, XServerLocal *server)
server->priv->have_vt_ref = FALSE;
}
x_server_local_release_display_number (x_server_get_display_number (X_SERVER (server)));
-
+
if (x_server_get_authority (X_SERVER (server)) && server->priv->authority_file)
{
l_debug (server, "Removing X server authority %s", server->priv->authority_file);
@@ -404,7 +404,7 @@ write_authority_file (XServerLocal *server)
if (!server->priv->authority_file)
{
gchar *run_dir, *dir;
-
+
run_dir = config_get_string (config_get_instance (), "LightDM", "run-directory");
dir = g_build_filename (run_dir, "root", NULL);
g_free (run_dir);
@@ -469,7 +469,7 @@ x_server_local_start (DisplayServer *display_server)
if (server->priv->layout)
g_string_append_printf (command, " -layout %s", server->priv->layout);
-
+
if (server->priv->xdg_seat)
g_string_append_printf (command, " -seat %s", server->priv->xdg_seat);
@@ -543,7 +543,7 @@ x_server_local_start (DisplayServer *display_server)
return result;
}
-
+
static void
x_server_local_stop (DisplayServer *server)
{
@@ -563,9 +563,9 @@ x_server_local_finalize (GObject *object)
{
XServerLocal *self;
- self = X_SERVER_LOCAL (object);
+ self = X_SERVER_LOCAL (object);
- if (self->priv->x_server_process)
+ if (self->priv->x_server_process)
{
g_signal_handlers_disconnect_matched (self->priv->x_server_process, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, self);
g_object_unref (self->priv->x_server_process);
diff --git a/src/x-server-local.h b/src/x-server-local.h
index 1dca0235..23c1d9a9 100644
--- a/src/x-server-local.h
+++ b/src/x-server-local.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/x-server-remote.c b/src/x-server-remote.c
index 5fc7ae95..1d1bc2a5 100644
--- a/src/x-server-remote.c
+++ b/src/x-server-remote.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/x-server-remote.h b/src/x-server-remote.h
index 70f8baad..024b8c3b 100644
--- a/src/x-server-remote.h
+++ b/src/x-server-remote.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/x-server-xvnc.c b/src/x-server-xvnc.c
index 884489dd..cea1782a 100644
--- a/src/x-server-xvnc.c
+++ b/src/x-server-xvnc.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -35,7 +35,7 @@ struct XServerXVNCPrivate
/* File descriptor to use for standard input */
gint socket_fd;
-
+
/* Geometry and colour depth */
gint width, height, depth;
@@ -237,10 +237,10 @@ x_server_xvnc_start (DisplayServer *display_server)
if (error)
l_warning (display_server, "Failed to write authority: %s", error->message);
g_clear_error (&error);
-
+
command = g_string_new (absolute_command);
g_free (absolute_command);
-
+
g_string_append_printf (command, " :%d", x_server_get_display_number (X_SERVER (server)));
g_string_append_printf (command, " -auth %s", server->priv->authority_file);
g_string_append (command, " -inetd -nolisten tcp");
@@ -271,7 +271,7 @@ x_server_xvnc_start (DisplayServer *display_server)
return result;
}
-
+
static void
x_server_xvnc_stop (DisplayServer *server)
{
diff --git a/src/x-server-xvnc.h b/src/x-server-xvnc.h
index d99ffe70..4a7bc54c 100644
--- a/src/x-server-xvnc.h
+++ b/src/x-server-xvnc.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/x-server.c b/src/x-server.c
index c23fe1f9..10ba903a 100644
--- a/src/x-server.c
+++ b/src/x-server.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -17,7 +17,7 @@
#include "configuration.h"
struct XServerPrivate
-{
+{
/* Host running the server */
gchar *hostname;
@@ -80,7 +80,7 @@ x_server_get_address (XServer *server)
server->priv->address = g_strdup_printf("%s:%d", server->priv->hostname, server->priv->number);
else
server->priv->address = g_strdup_printf(":%d", server->priv->number);
- }
+ }
return server->priv->address;
}
@@ -132,7 +132,7 @@ x_server_start (DisplayServer *display_server)
auth = &a;
}
- /* Open connection */
+ /* Open connection */
l_debug (server, "Connecting to XServer %s", x_server_get_address (server));
server->priv->connection = xcb_connect_to_display_with_auth_info (x_server_get_address (server), auth, NULL);
if (xcb_connection_has_error (server->priv->connection))
@@ -224,7 +224,7 @@ x_server_class_init (XServerClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
DisplayServerClass *display_server_class = DISPLAY_SERVER_CLASS (klass);
- display_server_class->get_session_type = x_server_get_session_type;
+ display_server_class->get_session_type = x_server_get_session_type;
display_server_class->get_can_share = x_server_get_can_share;
display_server_class->start = x_server_start;
display_server_class->connect_session = x_server_connect_session;
diff --git a/src/x-server.h b/src/x-server.h
index ef8ce627..2760b8a2 100644
--- a/src/x-server.h
+++ b/src/x-server.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/xdmcp-protocol.c b/src/xdmcp-protocol.c
index 698edba9..eb5517fb 100644
--- a/src/xdmcp-protocol.c
+++ b/src/xdmcp-protocol.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -187,7 +187,7 @@ xdmcp_packet_decode (const guint8 *data, gsize data_length)
length = read_card16 (&reader);
if (reader.overflow)
- {
+ {
g_warning ("Ignoring short packet"); // FIXME: Use GError
return NULL;
}
@@ -351,7 +351,7 @@ xdmcp_packet_encode (XDMCPPacket *packet, guint8 *data, gsize max_length)
write_string (&writer, packet->Request.manufacturer_display_id);
break;
case XDMCP_Accept:
- write_card32 (&writer, packet->Accept.session_id);
+ write_card32 (&writer, packet->Accept.session_id);
write_string (&writer, packet->Accept.authentication_name);
write_data (&writer, &packet->Accept.authentication_data);
write_string (&writer, packet->Accept.authorization_name);
@@ -399,7 +399,7 @@ xdmcp_packet_encode (XDMCPPacket *packet, guint8 *data, gsize max_length)
g_warning ("Overflow writing response");
return -1;
}
-
+
return length + 6;
}
@@ -425,8 +425,8 @@ string_list_tostring (gchar **strings)
GString *s;
gchar *string;
gchar **i;
-
- s = g_string_new ("");
+
+ s = g_string_new ("");
for (i = strings; *i; i++)
{
if (i != strings)
@@ -474,7 +474,7 @@ xdmcp_packet_tostring (XDMCPPacket *packet)
packet->Willing.authentication_name, packet->Willing.hostname, packet->Willing.status);
case XDMCP_Unwilling:
return g_strdup_printf ("Unwilling(hostname='%s' status='%s')",
- packet->Unwilling.hostname, packet->Unwilling.status);
+ packet->Unwilling.hostname, packet->Unwilling.status);
case XDMCP_Request:
t = string_list_tostring (packet->Request.authorization_names);
t2 = data_tostring (&packet->Request.authentication_data);
diff --git a/src/xdmcp-protocol.h b/src/xdmcp-protocol.h
index b8eeda09..1c7a639b 100644
--- a/src/xdmcp-protocol.h
+++ b/src/xdmcp-protocol.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -49,7 +49,7 @@ typedef struct
typedef struct
{
XDMCPOpcode opcode;
-
+
union
{
struct
diff --git a/src/xdmcp-server.c b/src/xdmcp-server.c
index a2d45637..4d45fb40 100644
--- a/src/xdmcp-server.c
+++ b/src/xdmcp-server.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -155,7 +155,7 @@ send_packet (GSocket *socket, GSocketAddress *address, XDMCPPacket *packet)
gssize n_written;
g_debug ("Send %s", xdmcp_packet_tostring (packet));
-
+
n_written = xdmcp_packet_encode (packet, data, 1024);
if (n_written < 0)
g_critical ("Failed to encode XDMCP packet");
@@ -215,7 +215,7 @@ handle_query (XDMCPServer *server, GSocket *socket, GSocketAddress *address, XDM
else
response->Unwilling.status = g_strdup ("Server does not support authentication");
}
-
+
send_packet (socket, address, response);
xdmcp_packet_free (response);
@@ -325,7 +325,7 @@ handle_request (XDMCPServer *server, GSocket *socket, GSocketAddress *address, X
xdmcp_packet_free (response);
return;
}
-
+
/* Must be using our authentication scheme */
if (strcmp (packet->Request.authentication_name, get_authentication_name (server)) != 0)
{
@@ -572,7 +572,7 @@ read_cb (GSocket *socket, GIOCondition condition, XDMCPServer *server)
packet = xdmcp_packet_decode ((guint8 *)data, n_read);
if (packet)
- {
+ {
g_debug ("Got %s", xdmcp_packet_tostring (packet));
switch (packet->opcode)
@@ -586,7 +586,7 @@ read_cb (GSocket *socket, GIOCondition condition, XDMCPServer *server)
handle_request (server, socket, address, packet);
break;
case XDMCP_Manage:
- handle_manage (server, socket, address, packet);
+ handle_manage (server, socket, address, packet);
break;
case XDMCP_KeepAlive:
handle_keep_alive (server, socket, address, packet);
@@ -609,7 +609,7 @@ open_udp_socket (GSocketFamily family, guint port, GError **error)
GSocket *socket;
GSocketAddress *address;
gboolean result;
-
+
socket = g_socket_new (family, G_SOCKET_TYPE_DATAGRAM, G_SOCKET_PROTOCOL_UDP, error);
if (!socket)
return NULL;
@@ -632,19 +632,19 @@ xdmcp_server_start (XDMCPServer *server)
GError *error = NULL;
g_return_val_if_fail (server != NULL, FALSE);
-
+
server->priv->socket = open_udp_socket (G_SOCKET_FAMILY_IPV4, server->priv->port, &error);
if (error)
g_warning ("Failed to create IPv4 XDMCP socket: %s", error->message);
g_clear_error (&error);
-
+
if (server->priv->socket)
{
source = g_socket_create_source (server->priv->socket, G_IO_IN, NULL);
g_source_set_callback (source, (GSourceFunc) read_cb, server, NULL);
g_source_attach (source, NULL);
}
-
+
server->priv->socket6 = open_udp_socket (G_SOCKET_FAMILY_IPV6, server->priv->port, &error);
if (error)
g_warning ("Failed to create IPv6 XDMCP socket: %s", error->message);
@@ -680,7 +680,7 @@ xdmcp_server_finalize (GObject *object)
XDMCPServer *self;
self = XDMCP_SERVER (object);
-
+
if (self->priv->socket)
g_object_unref (self->priv->socket);
if (self->priv->socket6)
@@ -689,8 +689,8 @@ xdmcp_server_finalize (GObject *object)
g_free (self->priv->status);
g_free (self->priv->key);
g_hash_table_unref (self->priv->sessions);
-
- G_OBJECT_CLASS (xdmcp_server_parent_class)->finalize (object);
+
+ G_OBJECT_CLASS (xdmcp_server_parent_class)->finalize (object);
}
static void
@@ -698,7 +698,7 @@ xdmcp_server_class_init (XDMCPServerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = xdmcp_server_finalize;
+ object_class->finalize = xdmcp_server_finalize;
g_type_class_add_private (klass, sizeof (XDMCPServerPrivate));
diff --git a/src/xdmcp-server.h b/src/xdmcp-server.h
index 5c12a365..31cd0fb6 100644
--- a/src/xdmcp-server.h
+++ b/src/xdmcp-server.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
diff --git a/src/xdmcp-session-private.h b/src/xdmcp-session-private.h
index adb133f2..a40568a1 100644
--- a/src/xdmcp-session-private.h
+++ b/src/xdmcp-session-private.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -28,7 +28,7 @@ struct XDMCPSessionPrivate
guint inactive_timeout;
XAuthority *authority;
-
+
gboolean started;
guint16 display_number;
diff --git a/src/xdmcp-session.c b/src/xdmcp-session.c
index da2a7081..71c5704d 100644
--- a/src/xdmcp-session.c
+++ b/src/xdmcp-session.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
@@ -80,7 +80,7 @@ xdmcp_session_finalize (GObject *object)
XDMCPSession *self;
self = XDMCP_SESSION (object);
-
+
g_free (self->priv->manufacturer_display_id);
if (self->priv->address)
g_object_unref (self->priv->address);
@@ -96,7 +96,7 @@ xdmcp_session_class_init (XDMCPSessionClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = xdmcp_session_finalize;
+ object_class->finalize = xdmcp_session_finalize;
g_type_class_add_private (klass, sizeof (XDMCPSessionPrivate));
}
diff --git a/src/xdmcp-session.h b/src/xdmcp-session.h
index 2205fe14..63b3f367 100644
--- a/src/xdmcp-session.h
+++ b/src/xdmcp-session.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010-2011 Robert Ancell.
* Author: Robert Ancell <robert.ancell@canonical.com>
- *
+ *
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later