From 9e2c789369973193cb98a7dcff818ba95baef1de Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 5 Apr 2010 19:36:43 +0000 Subject: [PATCH] Add connection progress to debug log. --- thconnection.c | 15 +++++++++++++++ thconnection.h | 1 + thrasher.c | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/thconnection.c b/thconnection.c index d1c329d..3928a17 100644 --- a/thconnection.c +++ b/thconnection.c @@ -54,6 +54,21 @@ gpointer thrasher_connection_get_handle () return &handle; } +void +thrasher_connection_update_progress(PurpleConnection *gc, + const char *text, + size_t step, + size_t step_count) { + g_return_if_fail(gc != NULL); + g_return_if_fail(text != NULL); + PurpleAccount *account = purple_connection_get_account(gc); + purple_debug_info("thrasher connection", + "%s: %s (step %d of %d)\n", + thrasher_account_get_jid(account), + text, + step + 1, + step_count); +} void thrasher_connection_init () { diff --git a/thconnection.h b/thconnection.h index 81d4415..a398787 100644 --- a/thconnection.h +++ b/thconnection.h @@ -21,5 +21,6 @@ void thrasher_connection_init(void); gpointer thrasher_connection_get_handle(void); +void thrasher_connection_update_progress(PurpleConnection *gc, const char *text, size_t step, size_t step_count); #endif /* THCONNECTION_H */ diff --git a/thrasher.c b/thrasher.c index 96c6c28..2f36ab1 100644 --- a/thrasher.c +++ b/thrasher.c @@ -69,7 +69,7 @@ static PurpleCoreUiOps thrasher_core_uiops = static PurpleConnectionUiOps thrasher_conn_uiops = { // connect progress - NULL, + thrasher_connection_update_progress, // connected, thrasher_connection, // disconnected -- 2.11.4.GIT