introduce and use pending_wakeup()
so we don't need to peek into internal data structures.
This commit is contained in:
parent
74c78c70b9
commit
f4240761f1
|
@ -164,6 +164,7 @@ typedef struct {
|
|||
void init_wakeup( wakeup_t *tmr, void (*cb)( void * ), void *aux );
|
||||
void conf_wakeup( wakeup_t *tmr, int timeout );
|
||||
void wipe_wakeup( wakeup_t *tmr );
|
||||
static INLINE int pending_wakeup( wakeup_t *tmr ) { return tmr->links.next != 0; }
|
||||
|
||||
void main_loop( void );
|
||||
|
||||
|
|
|
@ -529,7 +529,7 @@ maildir_uidval_lock( maildir_store_t *ctx )
|
|||
#endif
|
||||
char buf[128];
|
||||
|
||||
if (ctx->lcktmr.links.next) {
|
||||
if (pending_wakeup( &ctx->lcktmr )) {
|
||||
/* The unlock timer is active, so we are obviously already locked. */
|
||||
return DRV_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user