@@ -521,15 +521,15 @@ dup_str_ptr_array (const GPtrArray *src)
521521 *
522522 * @param[in] agent Agent providing the base configuration.
523523 * @param[in] update_cfg Optional configuration overrides. May be NULL.
524- * @param[in] cron_time Optional old cron time to remove. May be NULL.
524+ * @param[in] prev_cron_time Optional old cron time to remove. May be NULL.
525525 *
526526 * @return Newly allocated merged configuration on success,
527527 * or NULL on error.
528528 */
529529static agent_controller_agent_config_t
530530agent_controller_build_agent_config_with_defaults (
531531 const agent_controller_agent_t agent ,
532- const agent_controller_agent_config_t update_cfg , const gchar * cron_time )
532+ const agent_controller_agent_config_t update_cfg , const gchar * prev_cron_time )
533533{
534534 if (!agent || !agent -> config )
535535 return NULL ;
@@ -582,12 +582,13 @@ agent_controller_build_agent_config_with_defaults (
582582 agent -> config -> agent_script_executor .indexer_dir_depth ;
583583 }
584584
585- if (update_cfg )
585+ if (update_cfg && update_cfg -> agent_script_executor . scheduler_cron_time )
586586 {
587587 merged -> agent_script_executor .scheduler_cron_time =
588588 dup_str_ptr_array_merge_crons (
589589 agent -> config -> agent_script_executor .scheduler_cron_time ,
590- update_cfg -> agent_script_executor .scheduler_cron_time , cron_time );
590+ update_cfg -> agent_script_executor .scheduler_cron_time ,
591+ prev_cron_time );
591592 }
592593 else
593594 {
0 commit comments