git-svn-id: svn://db.shs.com.ru/pip@25 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2015-03-12 15:11:27 +00:00
parent 1003776861
commit 2574e4b2b6
3 changed files with 6 additions and 5 deletions

View File

@@ -301,7 +301,6 @@ bool PIPeer::dataRead(uchar * readed, int size) {
return true;
}
}
return true;
}
return true;
}

View File

@@ -119,8 +119,8 @@ public:
const PeerInfo & selfInfo() const {return self_info;}
const PIMap<PIString, PIVector<PeerInfo * > > & _peerMap() const {return addresses_map;}
void lock() {mc_mutex.lock();}
void unlock() {mc_mutex.unlock();}
void lock() {mc_mutex.lock(); eth_mutex.lock(); peers_mutex.lock();}
void unlock() {mc_mutex.unlock(); eth_mutex.unlock(); peers_mutex.unlock();}
EVENT2(dataReceivedEvent, const PIString &, from, const PIByteArray &, data);
EVENT1(peerConnectedEvent, const PIString &, name);

View File

@@ -123,6 +123,7 @@ public:
}
void updatePeerInfo() {
screen.lock();
daemon_.lock();
peers_tl->content.clear();
addrs_tl->content.clear();
peerinfo_tl->content.clear();
@@ -154,6 +155,7 @@ public:
}
piForeachC(PIString &s , peermap)
peermap_tl->content << TileList::Row(s, CellFormat());
daemon_.unlock();
screen.unlock();
}
void tick(void* data_, int delimiter) {
@@ -231,13 +233,13 @@ void tabConnect() {
}
int main(int argc, char * argv[]) {
//piDebug = false;
piDebug = false;
PICLI cli(argc, argv);
//cli.addArgument("");
sys_mon.startOnSelf();
screen.enableExitCapture(PIKbdListener::F10);
MainMenu menu;
//screen.start();
screen.start();
screen.waitForFinish();
//return 0;
/*while (!PIKbdListener::exiting) {