comparison libpurple/protocols/bonjour/bonjour.c @ 21358:ba41f2a60253

Rename: * PurpleDisconnectReason to PurpleConnectionError; * elements of that enum from PURPLE_REASON_* to PURPLE_CONNECTION_ERROR_*; * purple_connection_reason_is_fatal to purple_connection_error_is_fatal.
author Will Thompson <will.thompson@collabora.co.uk>
date Sun, 14 Oct 2007 21:08:42 +0000
parents bbcc9e206c43
children 38cc722159ff
comparison
equal deleted inserted replaced
21357:5a3242b676ad 21358:ba41f2a60253
100 PurpleStatus *status; 100 PurpleStatus *status;
101 PurplePresence *presence; 101 PurplePresence *presence;
102 102
103 #ifdef _WIN32 103 #ifdef _WIN32
104 if (!dns_sd_available()) { 104 if (!dns_sd_available()) {
105 purple_connection_error_reason(gc, PURPLE_REASON_OTHER_ERROR, 105 purple_connection_error_reason(gc,
106 PURPLE_CONNECTION_ERROR_OTHER_ERROR,
106 _("The Apple Bonjour For Windows toolkit wasn't found, see the FAQ at: " 107 _("The Apple Bonjour For Windows toolkit wasn't found, see the FAQ at: "
107 "http://developer.pidgin.im/wiki/Using%20Pidgin#CanIusePidginforBonjourLink-LocalMessaging" 108 "http://developer.pidgin.im/wiki/Using%20Pidgin#CanIusePidginforBonjourLink-LocalMessaging"
108 " for more information.")); 109 " for more information."));
109 return; 110 return;
110 } 111 }
118 bd->jabber_data->port = BONJOUR_DEFAULT_PORT_INT; 119 bd->jabber_data->port = BONJOUR_DEFAULT_PORT_INT;
119 bd->jabber_data->account = account; 120 bd->jabber_data->account = account;
120 121
121 if (bonjour_jabber_start(bd->jabber_data) == -1) { 122 if (bonjour_jabber_start(bd->jabber_data) == -1) {
122 /* Send a message about the connection error */ 123 /* Send a message about the connection error */
123 purple_connection_error_reason (gc, PURPLE_REASON_NETWORK_ERROR, 124 purple_connection_error_reason (gc,
125 PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
124 _("Unable to listen for incoming IM connections\n")); 126 _("Unable to listen for incoming IM connections\n"));
125 return; 127 return;
126 } 128 }
127 129
128 /* Connect to the mDNS daemon looking for buddies in the LAN */ 130 /* Connect to the mDNS daemon looking for buddies in the LAN */
144 bd->dns_sd_data->msg = g_strdup(purple_status_get_attr_string(status, "message")); 146 bd->dns_sd_data->msg = g_strdup(purple_status_get_attr_string(status, "message"));
145 147
146 bd->dns_sd_data->account = account; 148 bd->dns_sd_data->account = account;
147 if (!bonjour_dns_sd_start(bd->dns_sd_data)) 149 if (!bonjour_dns_sd_start(bd->dns_sd_data))
148 { 150 {
149 purple_connection_error_reason (gc, PURPLE_REASON_NETWORK_ERROR, 151 purple_connection_error_reason (gc,
152 PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
150 _("Unable to establish connection with the local mDNS server. Is it running?")); 153 _("Unable to establish connection with the local mDNS server. Is it running?"));
151 return; 154 return;
152 } 155 }
153 156
154 bonjour_dns_sd_update_buddy_icon(bd->dns_sd_data); 157 bonjour_dns_sd_update_buddy_icon(bd->dns_sd_data);