Changeset 3e621f3fd9ed1d3e4488b5078c62ec00cc069124

Show
Ignore:
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
  • src/misc/update.c

    r0b2ea3d r3e621f3  
    15251525    } 
    15261526 
    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 ); 
    15301533        if( fwrite( p_buffer, i_read, 1, p_file ) < 1 ) 
    15311534        { 
     
    15461549        } 
    15471550        free( psz_downloaded ); 
     1551        vlc_object_lock( p_udt ); 
    15481552    } 
    15491553 
     
    15521556    p_file = NULL; 
    15531557 
    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 ); 
    15561562        if( asprintf( &psz_status, "%s\nDone %s (100.0%%)", 
    15571563            p_update->release.psz_url, psz_size ) != -1 ) 
     
    15631569    else 
    15641570    { 
     1571        vlc_object_unlock( p_udt ); 
    15651572        utf8_unlink( psz_destfile ); 
    15661573        goto end;