Mercurial > pidgin.yaz
comparison src/protocols/msn/slplink.c @ 10602:f52ab405f1ab
[gaim-migrate @ 12032]
This is patch 1112281 from Felipe Contreras, it prevents file transfers being
cancelled when closing a conversation window with the sender/recipient.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Wed, 16 Feb 2005 20:14:12 +0000 |
parents | 0f7452b1f777 |
children | fe919915fceb |
comparison
equal
deleted
inserted
replaced
10601:e46b51de549a | 10602:f52ab405f1ab |
---|---|
52 fclose(tf); | 52 fclose(tf); |
53 g_free(tmp); | 53 g_free(tmp); |
54 } | 54 } |
55 #endif | 55 #endif |
56 | 56 |
57 /************************************************************************** | |
58 * Main | |
59 **************************************************************************/ | |
60 | |
57 MsnSlpLink * | 61 MsnSlpLink * |
58 msn_slplink_new(MsnSession *session, const char *username) | 62 msn_slplink_new(MsnSession *session, const char *username) |
59 { | 63 { |
60 MsnSlpLink *slplink; | 64 MsnSlpLink *slplink; |
61 | 65 |
153 } | 157 } |
154 | 158 |
155 return NULL; | 159 return NULL; |
156 } | 160 } |
157 | 161 |
162 void | |
163 msn_slplink_add_slpcall(MsnSlpLink *slplink, MsnSlpCall *slpcall) | |
164 { | |
165 if (slplink->slp_calls == NULL) | |
166 { | |
167 if (slplink->swboard != NULL) | |
168 slplink->swboard->flag |= MSN_SB_FLAG_FT; | |
169 } | |
170 | |
171 slplink->slp_calls = g_list_append(slplink->slp_calls, slpcall); | |
172 } | |
173 | |
174 void | |
175 msn_slplink_remove_slpcall(MsnSlpLink *slplink, MsnSlpCall *slpcall) | |
176 { | |
177 slplink->slp_calls = g_list_remove(slplink->slp_calls, slpcall); | |
178 | |
179 /* The slplink has no slpcalls in it, maybe we should destroy it. */ | |
180 if (slplink->slp_calls == NULL) | |
181 { | |
182 if (slplink->swboard != NULL) | |
183 slplink->swboard->flag &= ~MSN_SB_FLAG_FT; | |
184 } | |
185 } | |
186 | |
158 MsnSlpCall * | 187 MsnSlpCall * |
159 msn_slplink_find_slp_call(MsnSlpLink *slplink, const char *id) | 188 msn_slplink_find_slp_call(MsnSlpLink *slplink, const char *id) |
160 { | 189 { |
161 GList *l; | 190 GList *l; |
162 MsnSlpCall *slpcall; | 191 MsnSlpCall *slpcall; |
202 else | 231 else |
203 { | 232 { |
204 if (slplink->swboard == NULL) | 233 if (slplink->swboard == NULL) |
205 { | 234 { |
206 slplink->swboard = msn_session_get_swboard(slplink->session, | 235 slplink->swboard = msn_session_get_swboard(slplink->session, |
207 slplink->remote_user); | 236 slplink->remote_user, |
237 MSN_SB_FLAG_FT); | |
208 | 238 |
209 if (slplink->swboard == NULL) | 239 if (slplink->swboard == NULL) |
210 return; | 240 return; |
211 | 241 |
212 /* If swboard is destroyed we will be too */ | 242 /* If swboard is destroyed we will be too */ |