Mercurial > pidgin.yaz
comparison libpurple/protocols/silc10/ops.c @ 22235:4446de418df1
Update silc10 to use purple_connection_error_reason(), matching the uses in
silc.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Thu, 31 Jan 2008 17:43:14 +0000 |
parents | dccfd999ffe7 |
children | e0bcb8cfda74 |
comparison
equal
deleted
inserted
replaced
22234:f60ce471c174 | 22235:4446de418df1 |
---|---|
1695 } | 1695 } |
1696 | 1696 |
1697 return; | 1697 return; |
1698 break; | 1698 break; |
1699 case SILC_CLIENT_CONN_ERROR: | 1699 case SILC_CLIENT_CONN_ERROR: |
1700 purple_connection_error(gc, _("Error during connecting to SILC Server")); | 1700 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, |
1701 _("Error during connecting to SILC Server")); | |
1701 g_unlink(silcpurple_session_file(purple_account_get_username(sg->account))); | 1702 g_unlink(silcpurple_session_file(purple_account_get_username(sg->account))); |
1702 break; | 1703 break; |
1703 | 1704 |
1704 case SILC_CLIENT_CONN_ERROR_KE: | 1705 case SILC_CLIENT_CONN_ERROR_KE: |
1705 purple_connection_error(gc, _("Key Exchange failed")); | 1706 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR, |
1707 _("Key Exchange failed")); | |
1706 break; | 1708 break; |
1707 | 1709 |
1708 case SILC_CLIENT_CONN_ERROR_AUTH: | 1710 case SILC_CLIENT_CONN_ERROR_AUTH: |
1709 purple_connection_error(gc, _("Authentication failed")); | 1711 purple_connection_error_reason(gc, |
1712 PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED, | |
1713 _("Authentication failed")); | |
1710 break; | 1714 break; |
1711 | 1715 |
1712 case SILC_CLIENT_CONN_ERROR_RESUME: | 1716 case SILC_CLIENT_CONN_ERROR_RESUME: |
1713 purple_connection_error(gc, | 1717 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_OTHER_ERROR, |
1714 _("Resuming detached session failed. " | 1718 _("Resuming detached session failed. " |
1715 "Press Reconnect to create new connection.")); | 1719 "Press Reconnect to create new connection.")); |
1716 g_unlink(silcpurple_session_file(purple_account_get_username(sg->account))); | 1720 g_unlink(silcpurple_session_file(purple_account_get_username(sg->account))); |
1717 break; | 1721 break; |
1718 | 1722 |
1719 case SILC_CLIENT_CONN_ERROR_TIMEOUT: | 1723 case SILC_CLIENT_CONN_ERROR_TIMEOUT: |
1720 purple_connection_error(gc, _("Connection Timeout")); | 1724 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, |
1725 _("Connection Timeout")); | |
1721 break; | 1726 break; |
1722 } | 1727 } |
1723 | 1728 |
1724 /* Error */ | 1729 /* Error */ |
1725 sg->conn = NULL; | 1730 sg->conn = NULL; |
1744 | 1749 |
1745 sg->conn = NULL; | 1750 sg->conn = NULL; |
1746 | 1751 |
1747 /* Close the connection */ | 1752 /* Close the connection */ |
1748 if (!sg->detaching) | 1753 if (!sg->detaching) |
1749 purple_connection_error(gc, _("Disconnected by server")); | 1754 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, |
1755 _("Disconnected by server")); | |
1750 else | 1756 else |
1751 /* TODO: Does this work correctly? Maybe we need to set wants_to_die? */ | 1757 /* TODO: Does this work correctly? Maybe we need to set wants_to_die? */ |
1752 purple_account_disconnect(purple_connection_get_account(gc)); | 1758 purple_account_disconnect(purple_connection_get_account(gc)); |
1753 } | 1759 } |
1754 | 1760 |