PIIODevice::bytesAvailible()
fix pistringlist pibinarystream write pibinarystream::binaryStreamSize() PIByteArray pibinarystream read with more size fix pistring pibinarystream read optimization fix bug in PIIOBinaryStream read and write if failed workaround in PIIOString::readDevice PISPI readDevice bug Fixed
This commit is contained in:
@@ -49,6 +49,15 @@ PITransparentDevice::~PITransparentDevice() {
|
||||
}
|
||||
|
||||
|
||||
ssize_t PITransparentDevice::bytesAvailible() const {
|
||||
ssize_t ret = 0;
|
||||
que_mutex.lock();
|
||||
if (que.isNotEmpty()) ret = que.back().size();
|
||||
que_mutex.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int PITransparentDevice::readDevice(void * read_to, int max_size) {
|
||||
if (!canRead()) return -1;
|
||||
que_mutex.lock();
|
||||
|
||||
Reference in New Issue
Block a user