Mercurial > pidgin.yaz
comparison src/protocols/msn/slp.c @ 9259:f5f7482678d2
[gaim-migrate @ 10058]
Patch by Felipe Contreras. He says, "This patch creates a different
callback for the end of a slpcall, so there is no mistake with the current
callback for a sucessful slpcall ... when we reach the end of a slpcall the
slpcall data has been destroyed, the got_userdisplay cb should be called
only as the sucessfull slpcall callback."
Essentially, it fixes the corrupt buddy icon checksum issue, though it
needs another patch that has to be reworked first, if I understood right.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 10 Jun 2004 20:57:52 +0000 |
parents | ac8790437abe |
children | 70153c759016 |
comparison
equal
deleted
inserted
replaced
9258:43323228a3da | 9259:f5f7482678d2 |
---|---|
136 | 136 |
137 gaim_xfer_update_progress(xfer); | 137 gaim_xfer_update_progress(xfer); |
138 } | 138 } |
139 | 139 |
140 void | 140 void |
141 msn_xfer_finish_cb(MsnSlpCall *slpcall, | 141 msn_xfer_end_cb(MsnSlpCall *slpcall) |
142 const char *body, long long size) | |
143 { | 142 { |
144 if (gaim_xfer_get_status(slpcall->xfer) != GAIM_XFER_STATUS_DONE) | 143 if (gaim_xfer_get_status(slpcall->xfer) != GAIM_XFER_STATUS_DONE) |
145 { | 144 { |
146 if (size < 0) | 145 gaim_xfer_cancel_remote(slpcall->xfer); |
147 gaim_xfer_cancel_remote(slpcall->xfer); | 146 } |
148 else | 147 } |
149 gaim_xfer_set_completed(slpcall->xfer, TRUE); | 148 |
150 } | 149 void |
150 msn_xfer_completed_cb(MsnSlpCall *slpcall, const char *body, | |
151 long long size) | |
152 { | |
153 gaim_xfer_set_completed(slpcall->xfer, TRUE); | |
151 } | 154 } |
152 | 155 |
153 /************************************************************************** | 156 /************************************************************************** |
154 * SLP Control | 157 * SLP Control |
155 **************************************************************************/ | 158 **************************************************************************/ |
305 guint32 file_size; | 308 guint32 file_size; |
306 char *file_name; | 309 char *file_name; |
307 | 310 |
308 account = slpcall->slplink->session->account; | 311 account = slpcall->slplink->session->account; |
309 | 312 |
310 slpcall->cb = msn_xfer_finish_cb; | 313 slpcall->cb = msn_xfer_completed_cb; |
314 slpcall->end_cb = msn_xfer_end_cb; | |
311 slpcall->progress_cb = msn_xfer_progress_cb; | 315 slpcall->progress_cb = msn_xfer_progress_cb; |
312 slpcall->branch = g_strdup(branch); | 316 slpcall->branch = g_strdup(branch); |
313 | 317 |
314 xfer = gaim_xfer_new(account, GAIM_XFER_RECEIVE, | 318 xfer = gaim_xfer_new(account, GAIM_XFER_RECEIVE, |
315 slpcall->slplink->remote_user); | 319 slpcall->slplink->remote_user); |