if( !strcmp( ppsz_property[i], "enabled" ) ||
!strcmp( ppsz_property[i], "disabled" ) )
{
- vlm_ScheduleSetup( p_schedule, ppsz_property[i], NULL );
+ if ( vlm_ScheduleSetup( p_schedule, ppsz_property[i], NULL ) )
+ goto error;
}
else if( !strcmp( ppsz_property[i], "append" ) )
{
strcat( psz_line, ppsz_property[j] );
}
- vlm_ScheduleSetup( p_schedule, "append", psz_line );
+ if( vlm_ScheduleSetup( p_schedule, "append", psz_line ) )
+ goto error;
break;
}
else
return ExecuteSyntaxError( psz_cmd, pp_status );
}
- vlm_ScheduleSetup( p_schedule, ppsz_property[i], ppsz_property[i+1] );
+ if( vlm_ScheduleSetup( p_schedule, ppsz_property[i], ppsz_property[i+1] ) )
+ goto error;
i++;
}
}
*pp_status = vlm_MessageNew( psz_cmd, vlm_NULL );
return VLC_SUCCESS;
+
+error:
+ *pp_status = vlm_MessageNew( psz_cmd, "Error while setting the property '%s' to the schedule",
+ ppsz_property[i] );
+ return VLC_EGENERIC;
}
static int ExecuteMediaProperty( vlm_t *p_vlm, int64_t id, bool b_new,
{
schedule->i_date = 0;
}
- else if( (p == NULL) && sscanf( psz_value, "%d:%d:%d", &time.tm_hour,
- &time.tm_min, &time.tm_sec ) != 3 )
- /* it must be a hour:minutes:seconds */
+ else if(p == NULL)
{
return 1;
}