Shutdown/Reboot fails when multiple users are logged in #246

This commit is contained in:
Aleksey Lim 2009-09-30 11:53:03 +00:00
parent 8f52b0a8f4
commit 3d46fd8c99
3 changed files with 20 additions and 0 deletions

View File

@ -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")

View File

@ -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)
{

View File

@ -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);