changeset 27486:834236111afc

We have a convenience function to do this. Also, plug a leak of the status message on Google Talk when a buddy has a tune set.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 12 Jul 2009 22:25:44 +0000
parents 3da1d149de25
children 7a2891487a00
files libpurple/protocols/jabber/google.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/google.c	Sun Jul 12 20:03:43 2009 +0000
+++ b/libpurple/protocols/jabber/google.c	Sun Jul 12 22:25:44 2009 +0000
@@ -1290,9 +1290,10 @@
 {
 	if (!js->googletalk)
 		return;
-	if (jbr->status && !strncmp(jbr->status, "♫ ", strlen("♫ "))) {
+	if (jbr->status && purple_str_has_prefix(jbr->status, "♫ ")) {
 		purple_prpl_got_user_status(js->gc->account, user, "tune",
 					    PURPLE_TUNE_TITLE, jbr->status + strlen("♫ "), NULL);
+		g_free(jbr->status);
 		jbr->status = NULL;
 	} else {
 		purple_prpl_got_user_status_deactive(js->gc->account, user, "tune");