Mercurial > pidgin
comparison libpurple/protocols/bonjour/bonjour.c @ 20070:efadfc6e2117
Fix up Bonjour to use purple_connection_error_reason.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Tue, 18 Sep 2007 16:32:01 +0000 |
parents | 44b4e8bd759b |
children | f3cfcbbac3d8 |
comparison
equal
deleted
inserted
replaced
20069:2d38b90bee15 | 20070:efadfc6e2117 |
---|---|
107 bd->jabber_data->port = BONJOUR_DEFAULT_PORT_INT; | 107 bd->jabber_data->port = BONJOUR_DEFAULT_PORT_INT; |
108 bd->jabber_data->account = account; | 108 bd->jabber_data->account = account; |
109 | 109 |
110 if (bonjour_jabber_start(bd->jabber_data) == -1) { | 110 if (bonjour_jabber_start(bd->jabber_data) == -1) { |
111 /* Send a message about the connection error */ | 111 /* Send a message about the connection error */ |
112 purple_connection_error(gc, _("Unable to listen for incoming IM connections\n")); | 112 purple_connection_error_reason (gc, PURPLE_REASON_NETWORK_ERROR, |
113 _("Unable to listen for incoming IM connections\n")); | |
113 return; | 114 return; |
114 } | 115 } |
115 | 116 |
116 /* Connect to the mDNS daemon looking for buddies in the LAN */ | 117 /* Connect to the mDNS daemon looking for buddies in the LAN */ |
117 bd->dns_sd_data = bonjour_dns_sd_new(); | 118 bd->dns_sd_data = bonjour_dns_sd_new(); |
132 bd->dns_sd_data->msg = g_strdup(purple_status_get_attr_string(status, "message")); | 133 bd->dns_sd_data->msg = g_strdup(purple_status_get_attr_string(status, "message")); |
133 | 134 |
134 bd->dns_sd_data->account = account; | 135 bd->dns_sd_data->account = account; |
135 if (!bonjour_dns_sd_start(bd->dns_sd_data)) | 136 if (!bonjour_dns_sd_start(bd->dns_sd_data)) |
136 { | 137 { |
137 purple_connection_error(gc, _("Unable to establish connection with the local mDNS server. Is it running?")); | 138 purple_connection_error_reason (gc, PURPLE_REASON_NETWORK_ERROR, |
139 _("Unable to establish connection with the local mDNS server. Is it running?")); | |
138 return; | 140 return; |
139 } | 141 } |
140 | 142 |
141 bonjour_dns_sd_update_buddy_icon(bd->dns_sd_data); | 143 bonjour_dns_sd_update_buddy_icon(bd->dns_sd_data); |
142 | 144 |