{
assert( p_update );
+ // If the object already exist, destroy it
+ if( p_update->p_check )
+ {
+ vlc_object_kill( p_update->p_check );
+ vlc_thread_join( p_update->p_check );
+ vlc_object_release( p_update->p_check );
+ }
+
update_check_thread_t *p_uct =
vlc_custom_create( p_update->p_libvlc, sizeof( *p_uct ),
VLC_OBJECT_GENERIC, "update check" );
void update_WaitDownload( update_t *p_update )
{
- if(p_update->p_download)
+ if( p_update->p_download )
+ {
vlc_thread_join( p_update->p_download );
- vlc_object_release( p_update->p_download );
- p_update->p_download = NULL;
+ vlc_object_release( p_update->p_download );
+ p_update->p_download = NULL;
+ }
}
static void* update_DownloadReal( vlc_object_t *p_this );
{
assert( p_update );
+ // If the object already exist, destroy it
+ if( p_update->p_download )
+ {
+ vlc_object_kill( p_update->p_download );
+ vlc_thread_join( p_update->p_download );
+ vlc_object_release( p_update->p_download );
+ }
+
update_download_thread_t *p_udt =
vlc_custom_create( p_update->p_libvlc, sizeof( *p_udt ),
VLC_OBJECT_GENERIC, "update download" );