lms: Improve smpl_buf error logging

Change-Id: I511abe2c333443b978a3767bd7b7e320e07c4930
This commit is contained in:
Pau Espin 2020-01-13 14:35:06 +01:00
parent 1421adbc61
commit 62c9280590
1 changed files with 3 additions and 2 deletions

View File

@ -708,8 +708,9 @@ int LMSDevice::readSamples(std::vector < short *>&bufs, int len, bool * overrun,
for (size_t i = 0; i < rx_buffers.size(); i++) {
rc = rx_buffers[i]->read(bufs[i], len, timestamp);
if ((rc < 0) || (rc != len)) {
LOGC(DDEV, ERROR) << rx_buffers[i]->str_code(rc);
LOGC(DDEV, ERROR) << rx_buffers[i]->str_status(timestamp);
LOGCHAN(i, DDEV, ERROR) << rx_buffers[i]->str_code(rc) << ". "
<< rx_buffers[i]->str_status(timestamp)
<< ", (len=" << len << ")";
return 0;
}
}