Mercurial > pidgin
diff libpurple/connection.c @ 21364:5a7202fa43a0
I figured a signal firing on a connection error would be useful.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Wed, 24 Oct 2007 17:33:12 +0000 |
parents | ba41f2a60253 |
children | 38cc722159ff |
line wrap: on
line diff
--- a/libpurple/connection.c Wed Oct 24 14:48:58 2007 +0000 +++ b/libpurple/connection.c Wed Oct 24 17:33:12 2007 +0000 @@ -541,6 +541,9 @@ ops->report_disconnect (gc, description); } + purple_signal_emit(purple_connections_get_handle(), "connection-error", + gc, reason, description); + gc->disconnect_timeout = purple_timeout_add(0, purple_connection_disconnect_cb, purple_connection_get_account(gc)); } @@ -658,6 +661,14 @@ purple_marshal_VOID__POINTER, NULL, 1, purple_value_new(PURPLE_TYPE_SUBTYPE, PURPLE_SUBTYPE_CONNECTION)); + + purple_signal_register(handle, "connection-error", + purple_marshal_VOID__POINTER_INT_POINTER, NULL, 1, + purple_value_new(PURPLE_TYPE_SUBTYPE, + PURPLE_SUBTYPE_CONNECTION), + purple_value_new(PURPLE_TYPE_ENUM), + purple_value_new(PURPLE_TYPE_STRING)); + } void