git-svn-id: svn://db.shs.com.ru/pip@471 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -448,11 +448,12 @@ bool PIPeer::sendInternal(const PIString & to, const PIByteArray & data) {
|
||||
|
||||
|
||||
void PIPeer::dtReceived(const PIString & from, const PIByteArray & data) {
|
||||
PIByteArray ba = data;
|
||||
dataReceived(from, data);
|
||||
dataReceivedEvent(from, data);
|
||||
if (trust_peer.isEmpty() || trust_peer == from) {
|
||||
read_buffer_mutex.lock();
|
||||
if (read_buffer.size_s() < read_buffer_size) read_buffer.enqueue(data);
|
||||
if (read_buffer.size_s() < read_buffer_size) read_buffer.enqueue(ba);
|
||||
read_buffer_mutex.unlock();
|
||||
}
|
||||
}
|
||||
@@ -860,10 +861,11 @@ bool PIPeer::openDevice() {
|
||||
diag_d.reset();
|
||||
diag_s.reset();
|
||||
//piCoutObj << "open...";
|
||||
PIMutexLocker ml(peers_mutex);
|
||||
if (trust_peer.isEmpty())
|
||||
return !peers.isEmpty();
|
||||
return hasPeer(trust_peer);
|
||||
return true;
|
||||
// PIMutexLocker ml(peers_mutex);
|
||||
// if (trust_peer.isEmpty())
|
||||
// return !peers.isEmpty();
|
||||
// return hasPeer(trust_peer);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user