- int i;
- if( p_sys->b_update == true )
- {
- msg_Dbg( p_sd, "Update required" );
- char* psz_urls = var_GetNonEmptyString( p_sd, "podcast-urls" );
- if( psz_urls != NULL )
- ParseUrls( p_sd, psz_urls );
- free( psz_urls );
- p_sys->b_update = false;
- }
+ while( !p_sys->b_update )
+ vlc_cond_wait( &p_sys->wait, &p_sys->lock );
+
+ int canc = vlc_savecancel ();
+ msg_Dbg( p_sd, "Update required" );
+ char* psz_urls = var_GetNonEmptyString( p_sd, "podcast-urls" );
+ if( psz_urls != NULL )
+ ParseUrls( p_sd, psz_urls );
+ free( psz_urls );
+ p_sys->b_update = false;