Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/slpmsg.c @ 31266:471e9b81da41
Remove all unneeded MsnMessage related code that was replaced by SlpParts.
author | masca@cpw.pidgin.im |
---|---|
date | Wed, 23 Jun 2010 22:47:49 +0000 |
parents | 91ba047e838c |
children | 237e2c2874e6 |
comparison
equal
deleted
inserted
replaced
31265:4e0593a35b8c | 31266:471e9b81da41 |
---|---|
107 /* We don't want to free the data of the PurpleStoredImage, | 107 /* We don't want to free the data of the PurpleStoredImage, |
108 * but to avoid code duplication, it's sharing buffer. */ | 108 * but to avoid code duplication, it's sharing buffer. */ |
109 if (slpmsg->img == NULL) | 109 if (slpmsg->img == NULL) |
110 g_free(slpmsg->buffer); | 110 g_free(slpmsg->buffer); |
111 | 111 |
112 #if 0 | |
113 for (cur = slpmsg->msgs; cur != NULL; cur = g_list_delete_link(cur, cur)) | |
114 { | |
115 /* Something is pointing to this slpmsg, so we should remove that | |
116 * pointer to prevent a crash. */ | |
117 /* Ex: a user goes offline and after that we receive an ACK */ | |
118 | |
119 MsnMessage *msg = cur->data; | |
120 | |
121 msg->ack_cb = NULL; | |
122 msg->nak_cb = NULL; | |
123 msg->ack_data = NULL; | |
124 msn_message_unref(msg); | |
125 } | |
126 | |
127 slplink->slp_msgs = g_list_remove(slplink->slp_msgs, slpmsg); | |
128 #endif | |
129 | |
130 for (cur = slpmsg->parts; cur != NULL; cur = g_list_delete_link(cur, cur)) | 112 for (cur = slpmsg->parts; cur != NULL; cur = g_list_delete_link(cur, cur)) |
131 { | 113 { |
132 /* Something is pointing to this slpmsg, so we should remove that | 114 /* Something is pointing to this slpmsg, so we should remove that |
133 * pointer to prevent a crash. */ | 115 * pointer to prevent a crash. */ |
134 /* Ex: a user goes offline and after that we receive an ACK */ | 116 /* Ex: a user goes offline and after that we receive an ACK */ |
189 slpmsg->img = purple_imgstore_ref(img); | 171 slpmsg->img = purple_imgstore_ref(img); |
190 slpmsg->buffer = (guchar *)purple_imgstore_get_data(img); | 172 slpmsg->buffer = (guchar *)purple_imgstore_get_data(img); |
191 slpmsg->size = purple_imgstore_get_size(img); | 173 slpmsg->size = purple_imgstore_get_size(img); |
192 } | 174 } |
193 | 175 |
194 #if 0 | |
195 void | |
196 msn_slpmsg_show(MsnMessage *msg) | |
197 { | |
198 const char *info; | |
199 gboolean text; | |
200 guint32 flags; | |
201 | |
202 text = FALSE; | |
203 | |
204 flags = GUINT32_TO_LE(msg->slpmsg->header->flags); | |
205 | |
206 switch (flags) | |
207 { | |
208 case P2P_NO_FLAG : | |
209 info = "SLP CONTROL"; | |
210 text = TRUE; | |
211 break; | |
212 case P2P_ACK: | |
213 info = "SLP ACK"; break; | |
214 case P2P_MSN_OBJ_DATA: | |
215 case P2P_FILE_DATA: | |
216 info = "SLP DATA"; break; | |
217 default: | |
218 info = "SLP UNKNOWN"; break; | |
219 } | |
220 | |
221 msn_message_show_readable(msg, info, text); | |
222 } | |
223 #endif | |
224 | 176 |
225 MsnSlpMessage * | 177 MsnSlpMessage * |
226 msn_slpmsg_sip_new(MsnSlpCall *slpcall, int cseq, | 178 msn_slpmsg_sip_new(MsnSlpCall *slpcall, int cseq, |
227 const char *header, const char *branch, | 179 const char *header, const char *branch, |
228 const char *content_type, const char *content) | 180 const char *content_type, const char *content) |