OpenDNSSEC-signer 1.2.1
Functions

/build/buildd-opendnssec_1.2.1.dfsg-1-ia64-j6OroR/opendnssec-1.2.1.dfsg/signer/src/scheduler/task.c File Reference

#include "scheduler/task.h"
#include "signer/backup.h"
#include "signer/zone.h"
#include "util/duration.h"
#include "util/file.h"
#include "util/log.h"
#include "util/se_malloc.h"
#include <ldns/ldns.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for task.c:

Go to the source code of this file.

Functions

task_typetask_create (int what, time_t when, const char *who, struct zone_struct *zone)
task_typetask_recover_from_backup (const char *filename, struct zone_struct *zone)
void task_backup (task_type *task)
void task_cleanup (task_type *task)
int task_compare (const void *a, const void *b)
char * task2str (task_type *task, char *buftask)
void task_print (FILE *out, task_type *task)
tasklist_typetasklist_create (void)
void tasklist_cleanup (tasklist_type *list)
task_typetasklist_schedule_task (tasklist_type *list, task_type *task, int log)
void tasklist_flush (tasklist_type *list, task_id what)
task_typetasklist_delete_task (tasklist_type *list, task_type *task)
task_typetasklist_pop_task (tasklist_type *list)
task_typetasklist_first_task (tasklist_type *list)
void tasklist_print (FILE *out, tasklist_type *list)

Function Documentation

char* task2str ( task_type task,
char *  buftask 
)

Convert task to string.

Definition at line 253 of file task.c.

References task_struct::flush, se_calloc(), se_log_assert, time_now(), task_struct::what, task_struct::when, and task_struct::who.

void task_backup ( task_type task)
void task_cleanup ( task_type task)

Clean up task.

Definition at line 169 of file task.c.

References task_struct::dname, se_free(), se_log_warning(), and task_struct::who.

Referenced by tasklist_cleanup(), tasklist_schedule_task(), worker_start(), and zonelist_update().

int task_compare ( const void *  a,
const void *  b 
)

Compare tasks.

Definition at line 192 of file task.c.

References task_struct::dname, se_log_assert, and task_struct::when.

Referenced by tasklist_create().

task_type* task_create ( int  what,
time_t  when,
const char *  who,
struct zone_struct zone 
)
void task_print ( FILE *  out,
task_type task 
)

Print task.

Definition at line 292 of file task.c.

References task_struct::flush, se_log_assert, time_now(), task_struct::what, task_struct::when, and task_struct::who.

Referenced by tasklist_print().

task_type* task_recover_from_backup ( const char *  filename,
struct zone_struct zone 
)
void tasklist_cleanup ( tasklist_type list)
tasklist_type* tasklist_create ( void  )
task_type* tasklist_delete_task ( tasklist_type list,
task_type task 
)

Delete task from task list.

Definition at line 511 of file task.c.

References se_free(), se_log_assert, se_log_debug(), se_log_error(), se_log_warning(), and tasklist_struct::tasks.

Referenced by tasklist_pop_task(), zone_update_signconf(), and zonelist_update().

task_type* tasklist_first_task ( tasklist_type list)

First task from task list.

Definition at line 576 of file task.c.

References se_log_assert, and tasklist_struct::tasks.

Referenced by worker_start().

void tasklist_flush ( tasklist_type list,
task_id  what 
)

Flush task list.

Definition at line 484 of file task.c.

References task_struct::flush, se_log_assert, se_log_debug(), TASK_NONE, tasklist_struct::tasks, and task_struct::what.

task_type* tasklist_pop_task ( tasklist_type list)
void tasklist_print ( FILE *  out,
tasklist_type list 
)

Print task list.

Definition at line 599 of file task.c.

References se_log_assert, task_print(), and tasklist_struct::tasks.

task_type* tasklist_schedule_task ( tasklist_type list,
task_type task,
int  log 
)