Changeset 3e621f3fd9ed1d3e4488b5078c62ec00cc069124
- Timestamp:
- 25/06/08 22:44:54
(4 months ago)
- Author:
- Rémi Duraffort <ivoire@videolan.org>
- git-committer:
- Rémi Duraffort <ivoire@videolan.org> 1214426694 +0200
- git-parent:
[0b2ea3de7ef423f322aa569a956bbe404cbaed99]
- git-author:
- Rémi Duraffort <ivoire@videolan.org> 1214426324 +0200
- Message:
Fix the update system now we can't close vlc and stop the download correctly.
Should fixe #1635
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r0b2ea3d |
r3e621f3 |
|
| 1525 | 1525 | } |
|---|
| 1526 | 1526 | |
|---|
| 1527 | | while( ( i_read = stream_Read( p_stream, p_buffer, 1 << 10 ) ) && |
|---|
| 1528 | | !intf_ProgressIsCancelled( p_udt, i_progress ) ) |
|---|
| 1529 | | { |
|---|
| | 1527 | vlc_object_lock( p_udt ); |
|---|
| | 1528 | while( vlc_object_alive( p_udt ) && |
|---|
| | 1529 | ( i_read = stream_Read( p_stream, p_buffer, 1 << 10 ) ) && |
|---|
| | 1530 | !intf_ProgressIsCancelled( p_udt, i_progress ) ) |
|---|
| | 1531 | { |
|---|
| | 1532 | vlc_object_unlock( p_udt ); |
|---|
| 1530 | 1533 | if( fwrite( p_buffer, i_read, 1, p_file ) < 1 ) |
|---|
| 1531 | 1534 | { |
|---|
| … | … | |
| 1546 | 1549 | } |
|---|
| 1547 | 1550 | free( psz_downloaded ); |
|---|
| | 1551 | vlc_object_lock( p_udt ); |
|---|
| 1548 | 1552 | } |
|---|
| 1549 | 1553 | |
|---|
| … | … | |
| 1552 | 1556 | p_file = NULL; |
|---|
| 1553 | 1557 | |
|---|
| 1554 | | if( !intf_ProgressIsCancelled( p_udt, i_progress ) ) |
|---|
| 1555 | | { |
|---|
| | 1558 | if( vlc_object_alive( p_udt ) && |
|---|
| | 1559 | !intf_ProgressIsCancelled( p_udt, i_progress ) ) |
|---|
| | 1560 | { |
|---|
| | 1561 | vlc_object_unlock( p_udt ); |
|---|
| 1556 | 1562 | if( asprintf( &psz_status, "%s\nDone %s (100.0%%)", |
|---|
| 1557 | 1563 | p_update->release.psz_url, psz_size ) != -1 ) |
|---|
| … | … | |
| 1563 | 1569 | else |
|---|
| 1564 | 1570 | { |
|---|
| | 1571 | vlc_object_unlock( p_udt ); |
|---|
| 1565 | 1572 | utf8_unlink( psz_destfile ); |
|---|
| 1566 | 1573 | goto end; |
|---|