git-svn-id: svn://db.shs.com.ru/pip@355 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -193,7 +193,7 @@ public:
|
||||
bool isEnd() const {if (isClosed()) return true; return file.isEnd();}
|
||||
|
||||
//! Returns if BinLog file is empty
|
||||
bool isEmpty() const {return (file.size() <= PIBINARYLOG_SIGNATURE_SIZE + 1);}
|
||||
bool isEmpty() const {return (file.size() <= llong(PIBINARYLOG_SIGNATURE_SIZE + 1));}
|
||||
|
||||
//! Returns BinLog pause status
|
||||
bool isPause() const {return is_pause;}
|
||||
|
||||
@@ -235,7 +235,7 @@ PIVector<PIFile::FileInfo> PIDir::entries() {
|
||||
PIFile::FileInfo fi;
|
||||
DWORD ll = GetLogicalDriveStrings(1023, letters);
|
||||
PIString clet;
|
||||
for (int i = 0; i < ll; ++i) {
|
||||
for (DWORD i = 0; i < ll; ++i) {
|
||||
if (letters[i] == '\0') {
|
||||
clet.resize(2);
|
||||
fi.path = clet;
|
||||
|
||||
@@ -55,7 +55,7 @@ bool PIFileTransfer::send(PIVector<PIFile::FileInfo> entries) {
|
||||
scanning = false;
|
||||
scan_dir.up();
|
||||
//piCout << "files rel to" << d.absolutePath();
|
||||
for (int j = 0; j < fls.size(); j++) {
|
||||
for (uint j = 0; j < fls.size(); j++) {
|
||||
allEntries << PFTFileInfo(fls[j]);
|
||||
allEntries.back().dest_path = scan_dir.relative(fls[j].path);
|
||||
//piCout << " abs path" << fls[j].path;
|
||||
|
||||
@@ -134,7 +134,7 @@ PIString PIPeer::PeerInfo::fastestAddress() const {
|
||||
|
||||
REGISTER_DEVICE(PIPeer)
|
||||
|
||||
PIPeer::PIPeer(const PIString & n): PIIODevice(), eth_tcp_srv(PIEthernet::TCP_Server), eth_tcp_cli(PIEthernet::TCP_Client), diag_s(false), diag_d(false) {
|
||||
PIPeer::PIPeer(const PIString & n): PIIODevice(), inited__(false), eth_tcp_srv(PIEthernet::TCP_Server), eth_tcp_cli(PIEthernet::TCP_Client), diag_s(false), diag_d(false) {
|
||||
//piCout << " PIPeer" << uint(this);
|
||||
destroyed = false;
|
||||
setDebug(false);
|
||||
@@ -429,7 +429,7 @@ void PIPeer::dtReceived(const PIString & from, const PIByteArray & data) {
|
||||
dataReceivedEvent(from, data);
|
||||
if (trust_peer.isEmpty() || trust_peer == from) {
|
||||
read_buffer_mutex.lock();
|
||||
if (read_buffer.size() < read_buffer_size) read_buffer.enqueue(data);
|
||||
if (read_buffer.size_s() < read_buffer_size) read_buffer.enqueue(data);
|
||||
read_buffer_mutex.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,6 +195,7 @@ private:
|
||||
// Data packet: 4, from, to, ticks, data_size, data
|
||||
|
||||
protected:
|
||||
bool inited__; //for internal use
|
||||
PIMutex mc_mutex, eth_mutex, peers_mutex, send_mutex, send_mc_mutex;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user