comparison src/protocols/msn/slplink.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 ec2a51abcc71
children ac8790437abe
comparison
equal deleted inserted replaced
9225:554ef91db2dd 9226:7a00289f2ef1
291 debug_msg_to_file(msg, TRUE); 291 debug_msg_to_file(msg, TRUE);
292 #endif 292 #endif
293 293
294 msn_slplink_send_msg(slplink, msg); 294 msn_slplink_send_msg(slplink, msg);
295 295
296 if ((slpmsg->slpcall != NULL) && 296 if (slpmsg->flags == 0x20 || slpmsg->flags == 0x1000030)
297 (slpmsg->slpcall->progress_cb != NULL)) 297 {
298 { 298 if ((slpmsg->slpcall != NULL) &&
299 slpmsg->slpcall->progress_cb(slpmsg->slpcall, slpmsg->size, len, 299 (slpmsg->slpcall->progress_cb != NULL))
300 slpmsg->offset); 300 {
301 slpmsg->slpcall->progress_cb(slpmsg->slpcall, slpmsg->size, len,
302 slpmsg->offset);
303 }
301 } 304 }
302 305
303 slpmsg->offset += len; 306 slpmsg->offset += len;
304 } 307 }
305 308
465 if (slpmsg->slpcall == NULL) 468 if (slpmsg->slpcall == NULL)
466 slpmsg->slpcall = msn_slplink_find_slp_call_with_session_id(slplink, slpmsg->session_id); 469 slpmsg->slpcall = msn_slplink_find_slp_call_with_session_id(slplink, slpmsg->session_id);
467 470
468 if (slpmsg->slpcall != NULL) 471 if (slpmsg->slpcall != NULL)
469 { 472 {
470 GaimXfer *xfer; 473 if (slpmsg->flags == 0x20 || slpmsg->flags == 0x1000030)
471
472 xfer = slpmsg->slpcall->xfer;
473
474 if (xfer != NULL)
475 { 474 {
476 slpmsg->fp = 475 GaimXfer *xfer;
477 fopen(gaim_xfer_get_local_filename(slpmsg->slpcall->xfer), "wb"); 476
477 xfer = slpmsg->slpcall->xfer;
478
479 if (xfer != NULL)
480 {
481 slpmsg->fp =
482 fopen(gaim_xfer_get_local_filename(slpmsg->slpcall->xfer),
483 "wb");
484 }
478 } 485 }
479 } 486 }
480 } 487 }
481 } 488 }
482 else 489 else