pidgin: 20a2cebe: jabber: --header_contents;
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Tue Feb 16 10:23:08 EST 2010
-----------------------------------------------------------------
Revision: 20a2cebedc53676ed04bba9375a4e5a9cd97b6fd
Ancestor: 06b54841abdd2f3fb9f13ce08946429e4ea5543b
Author: darkrain42 at pidgin.im
Date: 2010-02-15T06:39:09
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/20a2cebedc53676ed04bba9375a4e5a9cd97b6fd
Modified files:
libpurple/protocols/jabber/buddy.c
libpurple/protocols/jabber/buddy.h
ChangeLog:
jabber: --header_contents;
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/buddy.c 849ebc9d6ffdb829029ef7670f511456e86aec8e
+++ libpurple/protocols/jabber/buddy.c b1ae9210a4d94c3be6fb7ea4e31ef2de694e7a79
@@ -57,6 +57,36 @@ typedef struct {
gchar *last_message;
} JabberBuddyInfo;
+static void
+jabber_buddy_resource_free(JabberBuddyResource *jbr)
+{
+ g_return_if_fail(jbr != NULL);
+
+ jbr->jb->resources = g_list_remove(jbr->jb->resources, jbr);
+
+ while(jbr->commands) {
+ JabberAdHocCommands *cmd = jbr->commands->data;
+ g_free(cmd->jid);
+ g_free(cmd->node);
+ g_free(cmd->name);
+ g_free(cmd);
+ jbr->commands = g_list_delete_link(jbr->commands, jbr->commands);
+ }
+
+ while (jbr->caps.exts) {
+ g_free(jbr->caps.exts->data);
+ jbr->caps.exts = g_list_delete_link(jbr->caps.exts, jbr->caps.exts);
+ }
+
+ g_free(jbr->name);
+ g_free(jbr->status);
+ g_free(jbr->thread_id);
+ g_free(jbr->client.name);
+ g_free(jbr->client.version);
+ g_free(jbr->client.os);
+ g_free(jbr);
+}
+
void jabber_buddy_free(JabberBuddy *jb)
{
g_return_if_fail(jb != NULL);
@@ -219,34 +249,6 @@ JabberBuddyResource *jabber_buddy_track_
return jbr;
}
-void jabber_buddy_resource_free(JabberBuddyResource *jbr)
-{
- g_return_if_fail(jbr != NULL);
-
- jbr->jb->resources = g_list_remove(jbr->jb->resources, jbr);
-
- while(jbr->commands) {
- JabberAdHocCommands *cmd = jbr->commands->data;
- g_free(cmd->jid);
- g_free(cmd->node);
- g_free(cmd->name);
- g_free(cmd);
- jbr->commands = g_list_delete_link(jbr->commands, jbr->commands);
- }
-
- if (jbr->caps.exts) {
- g_list_foreach(jbr->caps.exts, (GFunc)g_free, NULL);
- g_list_free(jbr->caps.exts);
- }
- g_free(jbr->name);
- g_free(jbr->status);
- g_free(jbr->thread_id);
- g_free(jbr->client.name);
- g_free(jbr->client.version);
- g_free(jbr->client.os);
- g_free(jbr);
-}
-
void jabber_buddy_remove_resource(JabberBuddy *jb, const char *resource)
{
JabberBuddyResource *jbr = jabber_buddy_find_resource(jb, resource);
============================================================
--- libpurple/protocols/jabber/buddy.h 533af9d5419405050575642e18da8085b5c92fb2
+++ libpurple/protocols/jabber/buddy.h c9c59a484267c94efe129ac386624575a822d148
@@ -97,7 +97,6 @@ JabberBuddyResource *jabber_buddy_track_
const char *resource);
JabberBuddyResource *jabber_buddy_track_resource(JabberBuddy *jb, const char *resource,
int priority, JabberBuddyState state, const char *status);
-void jabber_buddy_resource_free(JabberBuddyResource *jbr);
void jabber_buddy_remove_resource(JabberBuddy *jb, const char *resource);
void jabber_buddy_get_info(PurpleConnection *gc, const char *who);
More information about the Commits
mailing list