Edit

IABSD.fr/ports/sysutils/consolekit/patches/patch-libconsolekit_sd-compat_c

Branch :

  • Show log

    Commit

  • Author : robert
    Date : 2024-04-14 18:11:37
    Hash : 5c5d828a
    Message : implement sd_session_is_remote() compat function

  • sysutils/consolekit/patches/patch-libconsolekit_sd-compat_c
  • Index: libconsolekit/sd-compat.c
    --- libconsolekit/sd-compat.c.orig
    +++ libconsolekit/sd-compat.c
    @@ -265,3 +265,26 @@ sd_get_sessions(char ***sessions)
     
     	return ret;
     }
    +
    +int
    +sd_session_is_remote(const char *session)
    +{
    +	LibConsoleKit *ck = NULL;
    +	GError *error = NULL;
    +	gboolean is_remote = FALSE;
    +
    +	ck = lib_consolekit_new ();
    +
    +	is_remote = lib_consolekit_session_is_remote (ck, session, &error);
    +	if (error) {
    +		g_warning ("Unable to determine if session is remote: %s",
    +				error ? error->message : "");
    +		g_error_free (error);
    +		g_object_unref (ck);
    +		return FALSE;
    +	}
    +
    +	g_object_unref (ck);
    +
    +	return is_remote;
    +}