Shutdown/Reboot fails when multiple users are logged in #246
This commit is contained in:
parent
8f52b0a8f4
commit
3d46fd8c99
@ -345,6 +345,12 @@
|
||||
(return-type "none")
|
||||
)
|
||||
|
||||
(define-method cancel_shutdown
|
||||
(of-object "GsmSession")
|
||||
(c-name "gsm_session_cancel_shutdown")
|
||||
(return-type "none")
|
||||
)
|
||||
|
||||
(define-method register_client
|
||||
(of-object "GsmSession")
|
||||
(c-name "gsm_session_register_client")
|
||||
|
@ -344,6 +344,18 @@ session_cancel_shutdown (GsmSession *session)
|
||||
gsm_client_shutdown_cancelled (cl->data);
|
||||
}
|
||||
|
||||
void
|
||||
gsm_session_cancel_shutdown (GsmSession *session)
|
||||
{
|
||||
if (session == NULL || session->phase != GSM_SESSION_PHASE_SHUTDOWN)
|
||||
{
|
||||
g_warning ("Session is not in shutdown mode");
|
||||
return;
|
||||
}
|
||||
|
||||
session_cancel_shutdown (session);
|
||||
}
|
||||
|
||||
static void
|
||||
initiate_shutdown (GsmSession *session)
|
||||
{
|
||||
|
@ -84,6 +84,8 @@ GsmSessionPhase gsm_session_get_phase (GsmSession *session);
|
||||
|
||||
void gsm_session_initiate_shutdown (GsmSession *session);
|
||||
|
||||
void gsm_session_cancel_shutdown (GsmSession *session);
|
||||
|
||||
char *gsm_session_register_client (GsmSession *session,
|
||||
GsmClient *client,
|
||||
const char *previous_id);
|
||||
|
Loading…
Reference in New Issue
Block a user