Skip to content

Commit

Permalink
don't displey next schedule time if no tasks scheduled
Browse files Browse the repository at this point in the history
  • Loading branch information
yschaeff committed Jul 4, 2016
1 parent d530ba2 commit c74a76b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions enforcer/src/daemon/queue_cmd.c
Expand Up @@ -138,9 +138,9 @@ run(int sockfd, engine_type* engine, const char *cmd, ssize_t n,
if (nextFireTime > now) {
strftime(strtime, sizeof(strtime), "%c", localtime_r(&nextFireTime, &strtime_struct));
client_printf(sockfd, "Next task scheduled %s (%ld seconds since epoch)\n", strtime, (long)nextFireTime);
} else {
} else if (nextFireTime >= 0) {
client_printf(sockfd, "Next task scheduled immediately\n");
}
} /* else: no tasks scheduled at all. */

/* list tasks */
pthread_mutex_lock(&engine->taskq->schedule_lock);
Expand Down

0 comments on commit c74a76b

Please sign in to comment.