put in more debug spew about the session

2002-06-01  Havoc Pennington  <hp@pobox.com>

	* src/session.c: put in more debug spew about the session
This commit is contained in:
Havoc Pennington 2002-06-01 15:46:04 +00:00 committed by Havoc Pennington
parent a242f622ea
commit 9d68b98bc9
2 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2002-06-01 Havoc Pennington <hp@pobox.com>
* src/session.c: put in more debug spew about the session
2002-05-30 Havoc Pennington <hp@pobox.com> 2002-05-30 Havoc Pennington <hp@pobox.com>
* src/Makefile.am (INCLUDES): use $(prefix)/@DATADIRNAME@/locale * src/Makefile.am (INCLUDES): use $(prefix)/@DATADIRNAME@/locale

View File

@ -366,6 +366,10 @@ static void
save_yourself_possibly_done (gboolean shutdown, save_yourself_possibly_done (gboolean shutdown,
gboolean successful) gboolean successful)
{ {
meta_topic (META_DEBUG_SM,
"save possibly done shutdown = %d success = %d\n",
shutdown, successful);
if (current_state == STATE_SAVING_PHASE_1) if (current_state == STATE_SAVING_PHASE_1)
{ {
Status status; Status status;
@ -376,6 +380,9 @@ save_yourself_possibly_done (gboolean shutdown,
if (status) if (status)
current_state = STATE_WAITING_FOR_PHASE_2; current_state = STATE_WAITING_FOR_PHASE_2;
meta_topic (META_DEBUG_SM,
"Requested phase 2, status = %d\n", status);
} }
if (current_state == STATE_SAVING_PHASE_2 && if (current_state == STATE_SAVING_PHASE_2 &&
@ -393,12 +400,17 @@ save_yourself_possibly_done (gboolean shutdown,
if (status) if (status)
current_state = STATE_WAITING_FOR_INTERACT; current_state = STATE_WAITING_FOR_INTERACT;
meta_topic (META_DEBUG_SM,
"Requested interact, status = %d\n", status);
} }
if (current_state == STATE_SAVING_PHASE_1 || if (current_state == STATE_SAVING_PHASE_1 ||
current_state == STATE_SAVING_PHASE_2 || current_state == STATE_SAVING_PHASE_2 ||
current_state == STATE_DONE_WITH_INTERACT) current_state == STATE_DONE_WITH_INTERACT)
{ {
meta_topic (META_DEBUG_SM, "Sending SaveYourselfDone\n");
SmcSaveYourselfDone (session_connection, SmcSaveYourselfDone (session_connection,
successful); successful);
@ -414,6 +426,8 @@ save_phase_2_callback (SmcConn smc_conn, SmPointer client_data)
{ {
gboolean shutdown; gboolean shutdown;
meta_topic (META_DEBUG_SM, "Phase 2 save");
shutdown = GPOINTER_TO_INT (client_data); shutdown = GPOINTER_TO_INT (client_data);
current_state = STATE_SAVING_PHASE_2; current_state = STATE_SAVING_PHASE_2;
@ -433,6 +447,8 @@ save_yourself_callback (SmcConn smc_conn,
{ {
gboolean successful; gboolean successful;
meta_topic (META_DEBUG_SM, "SaveYourself received");
successful = TRUE; successful = TRUE;
/* The first SaveYourself after registering for the first time /* The first SaveYourself after registering for the first time
@ -480,11 +496,14 @@ static void
save_complete_callback (SmcConn smc_conn, SmPointer client_data) save_complete_callback (SmcConn smc_conn, SmPointer client_data)
{ {
/* nothing */ /* nothing */
meta_topic (META_DEBUG_SM, "SaveComplete received");
} }
static void static void
shutdown_cancelled_callback (SmcConn smc_conn, SmPointer client_data) shutdown_cancelled_callback (SmcConn smc_conn, SmPointer client_data)
{ {
meta_topic (META_DEBUG_SM, "Shutdown cancelled received");
if (session_connection != NULL && if (session_connection != NULL &&
(current_state != STATE_IDLE && current_state != STATE_FROZEN)) (current_state != STATE_IDLE && current_state != STATE_FROZEN))
{ {
@ -499,6 +518,8 @@ interact_callback (SmcConn smc_conn, SmPointer client_data)
/* nothing */ /* nothing */
gboolean shutdown; gboolean shutdown;
meta_topic (META_DEBUG_SM, "Interaction permission received");
shutdown = GPOINTER_TO_INT (client_data); shutdown = GPOINTER_TO_INT (client_data);
current_state = STATE_DONE_WITH_INTERACT; current_state = STATE_DONE_WITH_INTERACT;