comparison src/ft.c @ 4521:dda0fbba1c46

[gaim-migrate @ 4799] Canceling early shouldn't be problematic. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 04 Feb 2003 21:36:56 +0000
parents a6be92358df3
children f8fec48f0fde
comparison
equal deleted inserted replaced
4520:4fe661860577 4521:dda0fbba1c46
581 } 581 }
582 582
583 if (xfer->ops.end != NULL) 583 if (xfer->ops.end != NULL)
584 xfer->ops.end(xfer); 584 xfer->ops.end(xfer);
585 585
586 gaim_input_remove(xfer->watcher); 586 if (xfer->watcher != 0) {
587 xfer->watcher = 0; 587 gaim_input_remove(xfer->watcher);
588 588 xfer->watcher = 0;
589 close(xfer->fd); 589 }
590
591 if (xfer->fd != 0)
592 close(xfer->fd);
590 593
591 if (xfer->dest_fp != NULL) { 594 if (xfer->dest_fp != NULL) {
592 fclose(xfer->dest_fp); 595 fclose(xfer->dest_fp);
593 xfer->dest_fp = NULL; 596 xfer->dest_fp = NULL;
594 } 597 }
606 return; 609 return;
607 610
608 if (xfer->ops.cancel != NULL) 611 if (xfer->ops.cancel != NULL)
609 xfer->ops.cancel(xfer); 612 xfer->ops.cancel(xfer);
610 613
611 gaim_input_remove(xfer->watcher); 614 if (xfer->watcher != 0) {
612 xfer->watcher = 0; 615 gaim_input_remove(xfer->watcher);
613 616 xfer->watcher = 0;
614 close(xfer->fd); 617 }
618
619 if (xfer->fd != 0)
620 close(xfer->fd);
615 621
616 if (xfer->dest_fp != NULL) { 622 if (xfer->dest_fp != NULL) {
617 fclose(xfer->dest_fp); 623 fclose(xfer->dest_fp);
618 xfer->dest_fp = NULL; 624 xfer->dest_fp = NULL;
619 } 625 }