Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/oft.c @ 32827:4a34689eeb33 default tip
merged from im.pidgin.pidgin
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sat, 19 Nov 2011 14:42:54 +0900 |
parents | 0f94ec89f0bc 189b9a516d5d |
children |
comparison
equal
deleted
inserted
replaced
32692:0f94ec89f0bc | 32827:4a34689eeb33 |
---|---|
506 if (!purple_xfer_is_completed(conn->xfer)) | 506 if (!purple_xfer_is_completed(conn->xfer)) |
507 purple_xfer_set_completed(conn->xfer, TRUE); | 507 purple_xfer_set_completed(conn->xfer, TRUE); |
508 | 508 |
509 purple_input_remove(conn->watcher_incoming); | 509 purple_input_remove(conn->watcher_incoming); |
510 conn->watcher_incoming = 0; | 510 conn->watcher_incoming = 0; |
511 conn->xfer->fd = conn->fd; | 511 purple_xfer_set_fd(conn->xfer, conn->fd); |
512 conn->fd = -1; | 512 conn->fd = -1; |
513 conn->disconnect_reason = OSCAR_DISCONNECT_DONE; | 513 conn->disconnect_reason = OSCAR_DISCONNECT_DONE; |
514 peer_connection_schedule_destroy(conn, conn->disconnect_reason, NULL); | 514 peer_connection_schedule_destroy(conn, conn->disconnect_reason, NULL); |
515 } | 515 } |
516 | 516 |
600 PeerConnection *conn; | 600 PeerConnection *conn; |
601 | 601 |
602 conn = purple_xfer_get_protocol_data(xfer); | 602 conn = purple_xfer_get_protocol_data(xfer); |
603 | 603 |
604 /* Tell the other person that we've received everything */ | 604 /* Tell the other person that we've received everything */ |
605 conn->fd = conn->xfer->fd; | 605 conn->fd = purple_xfer_get_fd(conn->xfer); |
606 conn->xfer->fd = -1; | 606 purple_xfer_set_fd(conn->xfer, -1); |
607 peer_oft_send_done(conn); | 607 peer_oft_send_done(conn); |
608 | 608 |
609 conn->disconnect_reason = OSCAR_DISCONNECT_DONE; | 609 conn->disconnect_reason = OSCAR_DISCONNECT_DONE; |
610 conn->sending_data_timer = purple_timeout_add(100, | 610 conn->sending_data_timer = purple_timeout_add(100, |
611 destroy_connection_when_done_sending_data, conn); | 611 destroy_connection_when_done_sending_data, conn); |
649 | 649 |
650 void | 650 void |
651 peer_oft_sendcb_init(PurpleXfer *xfer) | 651 peer_oft_sendcb_init(PurpleXfer *xfer) |
652 { | 652 { |
653 PeerConnection *conn; | 653 PeerConnection *conn; |
654 size_t size; | 654 goffset size; |
655 gchar *f1 = NULL, *f2 = NULL; | 655 gchar *f1 = NULL, *f2 = NULL; |
656 gsize dummy; | 656 gsize dummy; |
657 | 657 |
658 conn = purple_xfer_get_protocol_data(xfer); | 658 conn = purple_xfer_get_protocol_data(xfer); |
659 conn->flags |= PEER_CONNECTION_FLAG_APPROVED; | 659 conn->flags |= PEER_CONNECTION_FLAG_APPROVED; |
733 * If we're done sending, intercept the socket from the core ft code | 733 * If we're done sending, intercept the socket from the core ft code |
734 * and wait for the other guy to send the "done" OFT packet. | 734 * and wait for the other guy to send the "done" OFT packet. |
735 */ | 735 */ |
736 if (purple_xfer_get_bytes_remaining(xfer) <= 0) | 736 if (purple_xfer_get_bytes_remaining(xfer) <= 0) |
737 { | 737 { |
738 purple_input_remove(xfer->watcher); | 738 purple_input_remove(purple_xfer_get_watcher(xfer)); |
739 conn->fd = xfer->fd; | 739 conn->fd = purple_xfer_get_fd(xfer); |
740 xfer->fd = -1; | 740 purple_xfer_set_fd(xfer, -1); |
741 conn->watcher_incoming = purple_input_add(conn->fd, | 741 conn->watcher_incoming = purple_input_add(conn->fd, |
742 PURPLE_INPUT_READ, peer_connection_recv_cb, conn); | 742 PURPLE_INPUT_READ, peer_connection_recv_cb, conn); |
743 } | 743 } |
744 } | 744 } |
745 | 745 |