hal: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Tue Mar 13 13:29:52 PDT 2007


 hald/ck-tracker.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

New commits:
diff-tree 37e9138258bcd891308cf8d56c1c1cbb553ddb77 (from 494b0e2cf6c739d2963d47c2ce576f0e8f6c8495)
Author: William Jon McCann <mccann at jhu.edu>
Date:   Tue Mar 13 16:29:49 2007 -0400

    hal updates for latest ConsoleKit
    
    Here is a patch that updates the HAL ck-tracker for two changes in
    method names in git CK.  The changes are:
    
     * Change GetHostName to GetRemoteHostName (and respective properties)
       There is no fallback or compatibility since we got the patch in to
       GDM before the release.
    
     * Prefer GetUnixUser over GetUser
       I've marked GetUser() and "user" property as deprecated.  I can't
       change it because GDM uses it.  But since I'll sync a CK release with
       HAL we should use the new name.

diff --git a/hald/ck-tracker.c b/hald/ck-tracker.c
index 83a868f..46d4850 100644
--- a/hald/ck-tracker.c
+++ b/hald/ck-tracker.c
@@ -222,11 +222,11 @@ ck_session_get_info (CKTracker *tracker,
 	message = dbus_message_new_method_call ("org.freedesktop.ConsoleKit", 
 						session->session_objpath,
 						"org.freedesktop.ConsoleKit.Session",
-						"GetHostName");
+						"GetRemoteHostName");
 	dbus_error_init (&error);
 	reply = dbus_connection_send_with_reply_and_block (tracker->dbus_connection, message, -1, &error);
 	if (reply == NULL || dbus_error_is_set (&error)) {
-		HAL_ERROR (("Error doing Session.GetHostName on ConsoleKit: %s: %s", error.name, error.message));
+		HAL_ERROR (("Error doing Session.GetRemoteHostName on ConsoleKit: %s: %s", error.name, error.message));
 		dbus_message_unref (message);
 		if (reply != NULL)
 			dbus_message_unref (reply);
@@ -235,7 +235,7 @@ ck_session_get_info (CKTracker *tracker,
 	if (!dbus_message_get_args (reply, NULL,
 				    DBUS_TYPE_STRING, &hostname,
 				    DBUS_TYPE_INVALID)) {
-		HAL_ERROR (("Invalid GetHostName reply from CK"));
+		HAL_ERROR (("Invalid GetRemoteHostName reply from CK"));
 		goto error;
 	}
 	session->hostname = g_strdup (hostname);
@@ -245,11 +245,11 @@ ck_session_get_info (CKTracker *tracker,
 	message = dbus_message_new_method_call ("org.freedesktop.ConsoleKit", 
 						session->session_objpath,
 						"org.freedesktop.ConsoleKit.Session",
-						"GetUser");
+						"GetUnixUser");
 	dbus_error_init (&error);
 	reply = dbus_connection_send_with_reply_and_block (tracker->dbus_connection, message, -1, &error);
 	if (reply == NULL || dbus_error_is_set (&error)) {
-		HAL_ERROR (("Error doing Session.GetUser on ConsoleKit: %s: %s", error.name, error.message));
+		HAL_ERROR (("Error doing Session.GetUnixUser on ConsoleKit: %s: %s", error.name, error.message));
 		dbus_message_unref (message);
 		if (reply != NULL)
 			dbus_message_unref (reply);
@@ -258,7 +258,7 @@ ck_session_get_info (CKTracker *tracker,
 	if (!dbus_message_get_args (reply, NULL,
 				    DBUS_TYPE_INT32, &(session->user),
 				    DBUS_TYPE_INVALID)) {
-		HAL_ERROR (("Invalid GetUser reply from CK"));
+		HAL_ERROR (("Invalid GetUnixUser reply from CK"));
 		goto error;
 	}
 	dbus_message_unref (message);


More information about the hal-commit mailing list