40 static const char* task_str =
"task";
58 ods_log_error(
"[%s] unable to create task: allocator_create() failed",
64 ods_log_error(
"[%s] unable to create task: allocator_alloc() failed",
95 fprintf(fd,
";;Task: when %u what %i interrupt %i halted %i backoff %i "
97 (
unsigned) task->
when,
123 if (!ldns_dname_compare((
const void*) zx->
apex,
124 (
const void*) zy->
apex)) {
136 return ldns_dname_compare((
const void*) zx->
apex,
137 (
const void*) zy->
apex);
153 return "[configure]";
182 if (zone && zone->
name) {
196 char* strtime = NULL;
197 char* strtask = NULL;
200 strtime = ctime(&task->
when);
202 strtime[strlen(strtime)-1] =
'\0';
205 (void)snprintf(buftask, ODS_SE_MAXLINE,
"%s %s I will %s zone %s"
206 "\n", task->
flush?
"Flush":
"On", strtime?strtime:
"(null)",
210 strtask = (
char*) calloc(ODS_SE_MAXLINE,
sizeof(
char));
212 snprintf(strtask, ODS_SE_MAXLINE,
"%s %s I will %s zone %s\n",
213 task->
flush?
"Flush":
"On", strtime?strtime:
"(null)",
217 ods_log_error(
"[%s] unable to convert task to string: malloc "
233 char* strtime = NULL;
236 strtime = ctime(&task->
when);
238 strtime[strlen(strtime)-1] =
'\0';
240 fprintf(out,
"%s %s I will %s zone %s\n",
241 task->
flush?
"Flush":
"On", strtime?strtime:
"(null)",
255 char* strtime = NULL;
258 strtime = ctime(&task->
when);
260 strtime[strlen(strtime)-1] =
'\0';
263 task->
flush?
"Flush":
"On", strtime?strtime:
"(null)",