git-svn-id: svn://db.shs.com.ru/pip@25 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -301,7 +301,6 @@ bool PIPeer::dataRead(uchar * readed, int size) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,8 +119,8 @@ public:
|
|||||||
const PeerInfo & selfInfo() const {return self_info;}
|
const PeerInfo & selfInfo() const {return self_info;}
|
||||||
const PIMap<PIString, PIVector<PeerInfo * > > & _peerMap() const {return addresses_map;}
|
const PIMap<PIString, PIVector<PeerInfo * > > & _peerMap() const {return addresses_map;}
|
||||||
|
|
||||||
void lock() {mc_mutex.lock();}
|
void lock() {mc_mutex.lock(); eth_mutex.lock(); peers_mutex.lock();}
|
||||||
void unlock() {mc_mutex.unlock();}
|
void unlock() {mc_mutex.unlock(); eth_mutex.unlock(); peers_mutex.unlock();}
|
||||||
|
|
||||||
EVENT2(dataReceivedEvent, const PIString &, from, const PIByteArray &, data);
|
EVENT2(dataReceivedEvent, const PIString &, from, const PIByteArray &, data);
|
||||||
EVENT1(peerConnectedEvent, const PIString &, name);
|
EVENT1(peerConnectedEvent, const PIString &, name);
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ public:
|
|||||||
}
|
}
|
||||||
void updatePeerInfo() {
|
void updatePeerInfo() {
|
||||||
screen.lock();
|
screen.lock();
|
||||||
|
daemon_.lock();
|
||||||
peers_tl->content.clear();
|
peers_tl->content.clear();
|
||||||
addrs_tl->content.clear();
|
addrs_tl->content.clear();
|
||||||
peerinfo_tl->content.clear();
|
peerinfo_tl->content.clear();
|
||||||
@@ -154,6 +155,7 @@ public:
|
|||||||
}
|
}
|
||||||
piForeachC(PIString &s , peermap)
|
piForeachC(PIString &s , peermap)
|
||||||
peermap_tl->content << TileList::Row(s, CellFormat());
|
peermap_tl->content << TileList::Row(s, CellFormat());
|
||||||
|
daemon_.unlock();
|
||||||
screen.unlock();
|
screen.unlock();
|
||||||
}
|
}
|
||||||
void tick(void* data_, int delimiter) {
|
void tick(void* data_, int delimiter) {
|
||||||
@@ -231,13 +233,13 @@ void tabConnect() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char * argv[]) {
|
int main(int argc, char * argv[]) {
|
||||||
//piDebug = false;
|
piDebug = false;
|
||||||
PICLI cli(argc, argv);
|
PICLI cli(argc, argv);
|
||||||
//cli.addArgument("");
|
//cli.addArgument("");
|
||||||
sys_mon.startOnSelf();
|
sys_mon.startOnSelf();
|
||||||
screen.enableExitCapture(PIKbdListener::F10);
|
screen.enableExitCapture(PIKbdListener::F10);
|
||||||
MainMenu menu;
|
MainMenu menu;
|
||||||
//screen.start();
|
screen.start();
|
||||||
screen.waitForFinish();
|
screen.waitForFinish();
|
||||||
//return 0;
|
//return 0;
|
||||||
/*while (!PIKbdListener::exiting) {
|
/*while (!PIKbdListener::exiting) {
|
||||||
|
|||||||
Reference in New Issue
Block a user