comparison src/protocols/msn/slp.c @ 9226:7a00289f2ef1

[gaim-migrate @ 10022] Some fixes from shx. The progress indicator for file transfers was being reset to 0 after files have been sent, and files were being truncated to 0 bytes. Also, when the file was transfered, the status was being set to "cancel." These are fixed now. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 06 Jun 2004 20:56:54 +0000
parents ab6636c5a136
children ac8790437abe
comparison
equal deleted inserted replaced
9225:554ef91db2dd 9226:7a00289f2ef1
129 { 129 {
130 GaimXfer *xfer; 130 GaimXfer *xfer;
131 131
132 xfer = slpcall->xfer; 132 xfer = slpcall->xfer;
133 133
134 xfer->bytes_sent = offset; 134 xfer->bytes_sent = (offset + len);
135 xfer->bytes_remaining = total_length - offset; 135 xfer->bytes_remaining = total_length - (offset + len);
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_finish_cb(MsnSlpCall *slpcall,
142 const char *body, long long size) 142 const char *body, long long size)
143 { 143 {
144 if (size < 0) 144 if (gaim_xfer_get_status(slpcall->xfer) != GAIM_XFER_STATUS_DONE)
145 gaim_xfer_cancel_remote(slpcall->xfer); 145 {
146 else 146 if (size < 0)
147 gaim_xfer_set_completed(slpcall->xfer, TRUE); 147 gaim_xfer_cancel_remote(slpcall->xfer);
148 else
149 gaim_xfer_set_completed(slpcall->xfer, TRUE);
150 }
148 } 151 }
149 152
150 /************************************************************************** 153 /**************************************************************************
151 * SLP Control 154 * SLP Control
152 **************************************************************************/ 155 **************************************************************************/