nicer debug traces

This commit is contained in:
Alexandre Ratchov 2014-03-06 16:59:57 +01:00
parent aa1877d6ef
commit e9feeda8a2
1 changed files with 5 additions and 2 deletions

View File

@ -96,17 +96,18 @@ sio_aucat_runmsg(struct sio_aucat_hdl *hdl)
hdl->sio.eof = 1;
return 0;
}
DPRINTFN(3, "aucat: data(%d)\n", size);
return 1;
case AMSG_FLOWCTL:
delta = ntohl(hdl->aucat.rmsg.u.ts.delta);
hdl->aucat.maxwrite += delta * (int)hdl->wbpf;
DPRINTFN(3, "aucat: flowctl = %d, maxwrite = %d\n",
DPRINTFN(3, "aucat: flowctl(%d), maxwrite = %d\n",
delta, hdl->aucat.maxwrite);
break;
case AMSG_MOVE:
delta = ntohl(hdl->aucat.rmsg.u.ts.delta);
hdl->delta += delta;
DPRINTFN(3, "aucat: move = %d, delta = %d, maxwrite = %d\n",
DPRINTFN(3, "aucat: move(%d), delta = %d, maxwrite = %d\n",
delta, hdl->delta, hdl->aucat.maxwrite);
if (hdl->delta >= 0) {
_sio_onmove_cb(&hdl->sio, hdl->delta);
@ -116,9 +117,11 @@ sio_aucat_runmsg(struct sio_aucat_hdl *hdl)
case AMSG_SETVOL:
ctl = ntohl(hdl->aucat.rmsg.u.vol.ctl);
hdl->curvol = hdl->reqvol = ctl;
DPRINTFN(3, "aucat: setvol(%d)\n", ctl);
_sio_onvol_cb(&hdl->sio, ctl);
break;
case AMSG_STOP:
DPRINTFN(3, "aucat: stop()\n");
hdl->pstate = PSTATE_INIT;
break;
default: