Skip to content

Commit

Permalink
Allow canceling of iphb wakeups by iphb_wait() with zero wakeup range
Browse files Browse the repository at this point in the history
The daemon side has always assumed that using zero wait window means
the client wants to cancel the currently programmed wakeup. For some
reason it was never noticed that the client library does not make the
request unless a non-zero wait period is defined.

Do not ignore iphb_wait*() requests with zero wait period.

[libiphb] Allow canceling of iphb wakeups by iphb_wait() with zero wakeup range. Fixes JB#20629
  • Loading branch information
spiiroin committed Sep 22, 2014
1 parent ae3c772 commit 61874d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libiphb.c
Expand Up @@ -171,7 +171,7 @@ iphb_wait2(iphb_t iphbh, unsigned mintime, unsigned maxtime, int must_wait, int
struct _iphb_req_t req = {IPHB_WAIT};
struct _iphb_wait_resp_t resp = {0};

if (!iphbh || mintime > maxtime || maxtime == 0) {
if( !iphbh || mintime > maxtime ) {
errno = EINVAL;
return (time_t)-1;
}
Expand Down

0 comments on commit 61874d7

Please sign in to comment.