}
dsi->tickle++;
- LOG(log_note, logtype_afpd, "afp_alarm: tickle count: %i", dsi->tickle);
+ LOG(log_maxdebug, logtype_afpd, "alarm: tickles: %u, flags: %s|%s|%s|%s|%s|%s|%s|%s|%s",
+ dsi->tickle,
+ (dsi->flags & DSI_DATA) ? "DSI_DATA" : "-",
+ (dsi->flags & DSI_RUNNING) ? "DSI_RUNNING" : "-",
+ (dsi->flags & DSI_SLEEPING) ? "DSI_SLEEPING" : "-",
+ (dsi->flags & DSI_EXTSLEEP) ? "DSI_EXTSLEEP" : "-",
+ (dsi->flags & DSI_DISCONNECTED) ? "DSI_DISCONNECTED" : "-",
+ (dsi->flags & DSI_DIE) ? "DSI_DIE" : "-",
+ (dsi->flags & DSI_NOREPLY) ? "DSI_NOREPLY" : "-",
+ (dsi->flags & DSI_RECONSOCKET) ? "DSI_RECONSOCKET" : "-",
+ (dsi->flags & DSI_RECONINPROG) ? "DSI_RECONINPROG" : "-");
if (dsi->flags & DSI_SLEEPING) {
if (dsi->tickle > AFPobj->options.sleep) {
}
}
- if (!dsi->flags & DSI_EXTSLEEP) {
+ if (!(dsi->flags & DSI_EXTSLEEP)) {
+ LOG(log_debug, logtype_afpd, "afp_over_dsi: got data, ending normal sleep");
dsi->flags &= ~DSI_SLEEPING;
dsi->tickle = 0;
}
if (data & AFPZZZ_EXT_WAKEUP) {
/* wakeup request from exetended sleep */
- if (dsi->flags & DSI_EXTSLEEP)
+ if (dsi->flags & DSI_EXTSLEEP) {
+ LOG(log_debug, logtype_afpd, "afp_zzz: waking up from extended sleep");
dsi->flags &= ~(DSI_SLEEPING | DSI_EXTSLEEP);
+ }
} else {
/* sleep request */
dsi->flags |= DSI_SLEEPING;
- if (data & AFPZZZ_EXT_SLEEP)
+ if (data & AFPZZZ_EXT_SLEEP) {
+ LOG(log_debug, logtype_afpd, "afp_zzz: entering extended sleep");
dsi->flags |= DSI_EXTSLEEP;
+ } else {
+ LOG(log_debug, logtype_afpd, "afp_zzz: entering normal sleep");
+ }
}
/*
* According to AFP 3.3 spec we should not return anything,