comparison libpurple/protocols/jabber/message.c @ 26684:06da00c70eae

Fix XMPP prpl->set_chat_topic with an empty string (or NULL) The slash-command /topic displays the message with no arguments, but the set_chat_topic should not. Closes #8810.
author Paul Aurich <paul@darkrain42.org>
date Sun, 26 Apr 2009 00:06:30 +0000
parents cb6dd7ee9df3
children 0054bf136314
comparison
equal deleted inserted replaced
26683:317f8d7e88f1 26684:06da00c70eae
595 if(!strcmp(child->name, "x")) 595 if(!strcmp(child->name, "x"))
596 jm->etc = g_list_append(jm->etc, child); 596 jm->etc = g_list_append(jm->etc, child);
597 /* The following tests expect xmlns != NULL */ 597 /* The following tests expect xmlns != NULL */
598 continue; 598 continue;
599 } else if(!strcmp(child->name, "subject") && !strcmp(xmlns,"jabber:client")) { 599 } else if(!strcmp(child->name, "subject") && !strcmp(xmlns,"jabber:client")) {
600 if(!jm->subject) 600 if(!jm->subject) {
601 jm->subject = xmlnode_get_data(child); 601 jm->subject = xmlnode_get_data(child);
602 if(!jm->subject)
603 jm->subject = g_strdup("");
604 }
602 } else if(!strcmp(child->name, "thread") && !strcmp(xmlns,"jabber:client")) { 605 } else if(!strcmp(child->name, "thread") && !strcmp(xmlns,"jabber:client")) {
603 if(!jm->thread_id) 606 if(!jm->thread_id)
604 jm->thread_id = xmlnode_get_data(child); 607 jm->thread_id = xmlnode_get_data(child);
605 } else if(!strcmp(child->name, "body") && !strcmp(xmlns,"jabber:client")) { 608 } else if(!strcmp(child->name, "body") && !strcmp(xmlns,"jabber:client")) {
606 if(!jm->body) { 609 if(!jm->body) {