Skip to content

Commit

Permalink
Merge pull request #147 from cableramki/master
Browse files Browse the repository at this point in the history
Added debug to distinguish between error and normal operation.
  • Loading branch information
schmidtw authored Jan 19, 2018
2 parents 2ae75d5 + 7288eb7 commit 904dcd2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ void *scheduler_thread(void *args)

tm.tv_sec = get_next_unixtime(current_schedule, current_unix_time);
rv = pthread_cond_timedwait(&cond_var, &schedule_lock, &tm);
if( ETIMEDOUT != rv) {
if( (0 == rv) || (ETIMEDOUT == rv) ) {
debug_info("pthread_cond_timedwait: %d(%s)\n", rv, strerror(rv));
} else {
debug_error("pthread_cond_timedwait: %d(%s)\n", rv, strerror(rv));
}

Expand Down

0 comments on commit 904dcd2

Please sign in to comment.