comparison libpurple/protocols/bonjour/mdns_howl.c @ 18804:b839f427cbb2

More minor leak fixes and cleanup to bonjour.
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 06 Aug 2007 00:12:52 +0000
parents 355f24d20501
children 7bf6b9a70b41
comparison
equal deleted inserted replaced
18803:abb9aac69507 18804:b839f427cbb2
143 } 143 }
144 } 144 }
145 break; 145 break;
146 case SW_DISCOVERY_BROWSE_REMOVE_SERVICE: 146 case SW_DISCOVERY_BROWSE_REMOVE_SERVICE:
147 purple_debug_info("bonjour", "_browser_reply --> Remove service\n"); 147 purple_debug_info("bonjour", "_browser_reply --> Remove service\n");
148 gb = purple_find_buddy((PurpleAccount*)extra, name); 148 gb = purple_find_buddy(account, name);
149 if (gb != NULL) 149 if (gb != NULL)
150 { 150 {
151 bonjour_buddy_delete(gb->proto_data); 151 bonjour_buddy_delete(gb->proto_data);
152 purple_blist_remove_buddy(gb); 152 purple_blist_remove_buddy(gb);
153 } 153 }
256 publish_result = sw_discovery_publish_update(idata->session, idata->session_id, 256 publish_result = sw_discovery_publish_update(idata->session, idata->session_id,
257 sw_text_record_bytes(dns_data), sw_text_record_len(dns_data)); 257 sw_text_record_bytes(dns_data), sw_text_record_len(dns_data));
258 break; 258 break;
259 } 259 }
260 260
261 if (publish_result != SW_OKAY) {
262 purple_debug_error("bonjour", "Unable to publish or change the status of the _presence._tcp service.\n");
263 return FALSE;
264 }
265
266 /* Free the memory used by temp data */ 261 /* Free the memory used by temp data */
267 sw_text_record_fina(dns_data); 262 sw_text_record_fina(dns_data);
263
264 if (publish_result != SW_OKAY) {
265 purple_debug_error("bonjour", "Unable to publish or change the status of the " ICHAT_SERVICE " service.\n");
266 return FALSE;
267 }
268 268
269 return TRUE; 269 return TRUE;
270 } 270 }
271 271
272 gboolean _mdns_browse(BonjourDnsSd *data) { 272 gboolean _mdns_browse(BonjourDnsSd *data) {
281 } 281 }
282 282
283 guint _mdns_register_to_mainloop(BonjourDnsSd *data) { 283 guint _mdns_register_to_mainloop(BonjourDnsSd *data) {
284 HowlSessionImplData *idata = data->mdns_impl_data; 284 HowlSessionImplData *idata = data->mdns_impl_data;
285 285
286 g_return_val_if_fail(idata != NULL, FALSE); 286 g_return_val_if_fail(idata != NULL, 0);
287 287
288 return purple_input_add(sw_discovery_socket(idata->session), 288 return purple_input_add(sw_discovery_socket(idata->session),
289 PURPLE_INPUT_READ, _mdns_handle_event, idata->session); 289 PURPLE_INPUT_READ, _mdns_handle_event, idata->session);
290 } 290 }
291 291