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:
@@ -924,6 +924,15 @@ void PIPeer::changeName(const PIString &new_name) {
|
||||
}
|
||||
|
||||
|
||||
ssize_t PIPeer::bytesAvailible() const {
|
||||
ssize_t ret = 0;
|
||||
read_buffer_mutex.lock();
|
||||
if (!read_buffer.isEmpty()) ret = read_buffer.back().size();
|
||||
read_buffer_mutex.unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int PIPeer::readDevice(void *read_to, int max_size) {
|
||||
read_buffer_mutex.lock();
|
||||
bool empty = read_buffer.isEmpty();
|
||||
|
||||
Reference in New Issue
Block a user