annotate src/protocols/bonjour/buddy.c @ 11496:3f038da50a18

[gaim-migrate @ 13740] Closer to compiling on head committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 10 Sep 2005 20:47:18 +0000
parents 36f575351c49
children 0dfda214df89
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11477
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
1 /*
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
2 * This program is free software; you can redistribute it and/or modify
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
3 * it under the terms of the GNU General Public License as published by
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
4 * the Free Software Foundation; either version 2 of the License, or
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
5 * (at your option) any later version.
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
6 *
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
7 * This program is distributed in the hope that it will be useful,
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
10 * GNU Library General Public License for more details.
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
11 *
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
12 * You should have received a copy of the GNU General Public License
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
13 * along with this program; if not, write to the Free Software
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
14 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
15 */
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
16
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
17
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
18 #include <glib.h>
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
19 #include <stdlib.h>
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
20
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
21 #include "buddy.h"
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
22 #include "account.h"
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
23 #include "blist.h"
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
24 #include "bonjour.h"
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
25 #include "debug.h"
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
26
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
27 /**
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
28 * Creates a new buddy.
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
29 */
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
30 BonjourBuddy* bonjour_buddy_new(gchar* name, gchar* first, gint port_p2pj,
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
31 gchar* phsh, gchar* status, gchar* email, gchar* last, gchar* jid, gchar* AIM,
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
32 gchar* vc, gchar* ip, gchar* msg)
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
33 {
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
34 BonjourBuddy* buddy = malloc(sizeof(BonjourBuddy));
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
35
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
36 buddy->name = g_strdup(name);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
37 buddy->first = g_strdup(first);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
38 buddy->port_p2pj = port_p2pj;
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
39 buddy->phsh = g_strdup(phsh);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
40 buddy->status = g_strdup(status);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
41 buddy->email = g_strdup(email);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
42 buddy->last = g_strdup(last);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
43 buddy->jid = g_strdup(jid);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
44 buddy->AIM = g_strdup(AIM);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
45 buddy->vc = g_strdup(vc);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
46 buddy->ip = g_strdup(ip);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
47 buddy->msg = g_strdup(msg);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
48 buddy->conversation = NULL;
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
49
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
50 return buddy;
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
51 }
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
52
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
53 /**
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
54 * Check if all the compulsory buddy data is present.
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
55 */
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
56 gboolean bonjour_buddy_check(BonjourBuddy* buddy)
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
57 {
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
58 if(buddy->name == NULL){
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
59 return FALSE;
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
60 }
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
61
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
62 if(buddy->first == NULL){
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
63 return FALSE;
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
64 }
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
65
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
66 if(buddy->last == NULL){
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
67 return FALSE;
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
68 }
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
69
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
70 if(buddy->port_p2pj == -1){
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
71 return FALSE;
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
72 }
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
73
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
74 if(buddy->status == NULL){
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
75 return FALSE;
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
76 }
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
77
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
78 return TRUE;
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
79 }
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
80
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
81 /**
11496
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
82 * If the buddy does not yet exist, then create it and add it to
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
83 * our buddy list. In either case we set the correct status for
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
84 * the buddy.
11477
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
85 */
11496
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
86 void
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
87 bonjour_buddy_add_to_gaim(GaimAccount *account, BonjourBuddy *bonjour_buddy)
11477
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
88 {
11496
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
89 GaimBuddy *buddy;
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
90 GaimGroup *group;
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
91 const char *status_id, *first, *last;
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
92 char *alias;
11477
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
93
11496
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
94 /* Translate between the Bonjour status and the Gaim status */
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
95 if (g_ascii_strcasecmp("dnd", bonjour_buddy->status) == 0)
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
96 status_id = BONJOUR_STATUS_ID_AWAY;
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
97 else
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
98 status_id = BONJOUR_STATUS_ID_AVAILABLE;
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
99
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
100 /*
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
101 * TODO: Figure out the idle time by getting the "away"
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
102 * field from the DNS SD.
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
103 */
11477
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
104
11496
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
105 /* Create the alias for the buddy using the first and the last name */
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
106 first = bonjour_buddy->first;
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
107 last = bonjour_buddy->last;
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
108 alias = g_strdup_printf("%s%s%s",
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
109 (first && *first ? first : ""),
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
110 (first && *first && last && *last ? " " : ""),
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
111 (last && *last ? last : ""));
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
112
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
113 /* Make sure the Bonjour group exists in our buddy list */
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
114 group = gaim_find_group(BONJOUR_GROUP_NAME); /* Use the buddy's domain, instead? */
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
115 if (group == NULL)
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
116 {
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
117 group = gaim_group_new(BONJOUR_GROUP_NAME);
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
118 gaim_blist_add_group(group, NULL);
11477
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
119 }
11496
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
120
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
121 /* Make sure the buddy exists in our buddy list */
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
122 buddy = gaim_find_buddy(account, bonjour_buddy->name);
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
123 if (buddy == NULL)
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
124 {
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
125 buddy = gaim_buddy_new(account, bonjour_buddy->name, alias);
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
126 gaim_blist_node_set_flags((GaimBlistNode *)buddy, GAIM_BLIST_NODE_FLAG_NO_SAVE);
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
127 gaim_blist_add_buddy(buddy, NULL, group, NULL);
11477
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
128 }
11496
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
129
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
130 /* Set the user's status */
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
131 gaim_prpl_got_user_status(account, buddy->name, status_id, NULL);
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
132 gaim_prpl_got_user_idle(account, buddy->name, FALSE, 0);
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
133
3f038da50a18 [gaim-migrate @ 13740]
Mark Doliner <mark@kingant.net>
parents: 11477
diff changeset
134 g_free(alias);
11477
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
135 }
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
136
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
137 /**
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
138 * Deletes a buddy from memory.
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
139 */
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
140 void bonjour_buddy_delete(BonjourBuddy* buddy)
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
141 {
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
142 g_free(buddy->name);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
143 g_free(buddy->first);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
144 g_free(buddy->phsh);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
145 g_free(buddy->status);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
146 g_free(buddy->email);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
147 g_free(buddy->last);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
148 g_free(buddy->jid);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
149 g_free(buddy->AIM);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
150 g_free(buddy->vc);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
151 g_free(buddy->ip);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
152 g_free(buddy->msg);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
153
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
154 if (buddy->conversation != NULL) {
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
155 g_free(buddy->conversation->buddy_name);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
156 g_free(buddy->conversation);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
157 }
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
158
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
159 free(buddy);
36f575351c49 [gaim-migrate @ 13719]
Mark Doliner <mark@kingant.net>
parents:
diff changeset
160 }