* Remaining text is a required description of the update
*/
-#if defined( UNDER_CE )
-# define UPDATE_OS_SUFFIX "-ce"
-#elif defined( WIN64 )
+#if defined( WIN64 )
# define UPDATE_OS_SUFFIX "-win-x64"
#elif defined( WIN32 )
# define UPDATE_OS_SUFFIX "-win-x86"
if( p_update->p_download )
{
- vlc_object_kill( p_update->p_download );
+ vlc_atomic_set( &p_update->p_download->aborted, 1 );
vlc_join( p_update->p_download->thread, NULL );
vlc_object_release( p_update->p_download );
}
// If the object already exist, destroy it
if( p_update->p_download )
{
- vlc_object_kill( p_update->p_download );
+ vlc_atomic_set( &p_update->p_download->aborted, 1 );
vlc_join( p_update->p_download->thread, NULL );
vlc_object_release( p_update->p_download );
}
p_update->p_download = p_udt;
p_udt->psz_destdir = psz_destdir ? strdup( psz_destdir ) : NULL;
+ vlc_atomic_set(&p_udt->aborted, 0);
vlc_clone( &p_udt->thread, update_DownloadReal, p_udt, VLC_THREAD_PRIORITY_LOW );
}
if( p_progress == NULL )
goto end;
- while( vlc_object_alive( p_udt ) &&
+ while( !vlc_atomic_get( &p_udt->aborted ) &&
( i_read = stream_Read( p_stream, p_buffer, 1 << 10 ) ) &&
!dialog_ProgressCancelled( p_progress ) )
{
fclose( p_file );
p_file = NULL;
- if( vlc_object_alive( p_udt ) &&
+ if( !vlc_atomic_get( &p_udt->aborted ) &&
!dialog_ProgressCancelled( p_progress ) )
{
dialog_ProgressDestroy( p_progress );