changeset 11841:f91b4fedd8b5

[gaim-migrate @ 14132] The first thing bonjour_dns_sd_send_status() does is free data->status, so passing it a pointer to that as the new status is stupid. This leaked too. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 26 Oct 2005 10:32:06 +0000
parents 047f85200139
children cdd941172951
files src/protocols/bonjour/bonjour.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/bonjour/bonjour.c	Wed Oct 26 08:35:12 2005 +0000
+++ b/src/protocols/bonjour/bonjour.c	Wed Oct 26 10:32:06 2005 +0000
@@ -181,7 +181,7 @@
 	GaimStatusType *type;
 	int primitive;
 	GaimPresence *presence;
-	const char *message;
+	const char *message, *bonjour_status;
 
 	gc = gaim_account_get_connection(account);
 	bd = gc->proto_data;
@@ -206,13 +206,13 @@
 	 * Each of them can have an optional message.
 	 */
 	if (gaim_presence_is_available(presence))
-		bd->dns_sd_data->status = g_strdup("avail");
+		bonjour_status = "avail";
 	else if (gaim_presence_is_idle(presence))
-		bd->dns_sd_data->status = g_strdup("away");
+		bonjour_status = "away";
 	else
-		bd->dns_sd_data->status = g_strdup("dnd");
+		bonjour_status = "dnd";
 
-	bonjour_dns_sd_send_status(bd->dns_sd_data, bd->dns_sd_data->status, message);
+	bonjour_dns_sd_send_status(bd->dns_sd_data, bonjour_status, message);
 }
 
 static GList *