# HG changeset patch # User Will Thompson # Date 1190133166 0 # Node ID 88b97e07f35f9e21fd9a351502c567ac5bf1bd65 # Parent efadfc6e2117f4bdba6b5097e46676476efcaef2# Parent d3bd5414eb0fc688d6c60ed9458eacb27a79c3d1 merge of '688a896af7f228132e0f78057e7ed5812c3f7b13' and 'a6d6e5d83afac011fd739de6e393618695171e7c' diff -r d3bd5414eb0f -r 88b97e07f35f libpurple/protocols/bonjour/bonjour.c --- a/libpurple/protocols/bonjour/bonjour.c Mon Sep 17 17:51:22 2007 +0000 +++ b/libpurple/protocols/bonjour/bonjour.c Tue Sep 18 16:32:46 2007 +0000 @@ -109,7 +109,8 @@ if (bonjour_jabber_start(bd->jabber_data) == -1) { /* Send a message about the connection error */ - purple_connection_error(gc, _("Unable to listen for incoming IM connections\n")); + purple_connection_error_reason (gc, PURPLE_REASON_NETWORK_ERROR, + _("Unable to listen for incoming IM connections\n")); return; } @@ -134,7 +135,8 @@ bd->dns_sd_data->account = account; if (!bonjour_dns_sd_start(bd->dns_sd_data)) { - purple_connection_error(gc, _("Unable to establish connection with the local mDNS server. Is it running?")); + purple_connection_error_reason (gc, PURPLE_REASON_NETWORK_ERROR, + _("Unable to establish connection with the local mDNS server. Is it running?")); return; } diff -r d3bd5414eb0f -r 88b97e07f35f libpurple/protocols/bonjour/jabber.c --- a/libpurple/protocols/bonjour/jabber.c Mon Sep 17 17:51:22 2007 +0000 +++ b/libpurple/protocols/bonjour/jabber.c Tue Sep 18 16:32:46 2007 +0000 @@ -580,7 +580,8 @@ if ((data->socket = socket(PF_INET, SOCK_STREAM, 0)) < 0) { purple_debug_error("bonjour", "Cannot open socket: %s\n", strerror(errno)); - purple_connection_error(data->account->gc, _("Cannot open socket")); + purple_connection_error_reason (data->account->gc, + PURPLE_REASON_NETWORK_ERROR, _("Cannot open socket")); return -1; } @@ -588,7 +589,8 @@ if (setsockopt(data->socket, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) != 0) { purple_debug_error("bonjour", "Error setting socket options: %s\n", strerror(errno)); - purple_connection_error(data->account->gc, _("Error setting socket options")); + purple_connection_error_reason (data->account->gc, + PURPLE_REASON_NETWORK_ERROR, _("Error setting socket options")); return -1; } @@ -612,7 +614,8 @@ if (!bind_successful) { purple_debug_error("bonjour", "Cannot bind socket: %s\n", strerror(errno)); - purple_connection_error(data->account->gc, _("Could not bind socket to port")); + purple_connection_error_reason (data->account->gc, + PURPLE_REASON_NETWORK_ERROR, _("Could not bind socket to port")); return -1; } @@ -620,7 +623,8 @@ if (listen(data->socket, 10) != 0) { purple_debug_error("bonjour", "Cannot listen on socket: %s\n", strerror(errno)); - purple_connection_error(data->account->gc, _("Could not listen on socket")); + purple_connection_error_reason (data->account->gc, + PURPLE_REASON_NETWORK_ERROR, _("Could not listen on socket")); return -1; }