git-svn-id: svn://db.shs.com.ru/pip@384 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -149,7 +149,7 @@ PIPeer::PIPeer(const PIString & n): PIIODevice(), inited__(false), eth_tcp_srv(P
|
||||
self_info.time = PISystemTime::current();
|
||||
//joinMulticastGroup("239.240.241.242");
|
||||
randomize();
|
||||
//id_ = self_info.name + "_" + PIString::fromNumber(rand());
|
||||
//id_ = self_info.name + "_" + PIString::fromNumber(randomi());
|
||||
CONNECTU(&sync_timer, tickEvent, this, timerEvent);
|
||||
prev_ifaces = PIEthernet::interfaces();
|
||||
no_timer = false;
|
||||
@@ -912,7 +912,7 @@ void PIPeer::reinit() {
|
||||
|
||||
void PIPeer::changeName(const PIString &new_name) {
|
||||
PIString name_ = new_name;
|
||||
if (name_.isEmpty()) name_ = "rnd_" + PIString::fromNumber(random() % 1000);
|
||||
if (name_.isEmpty()) name_ = "rnd_" + PIString::fromNumber(randomi() % 1000);
|
||||
setName(name_);
|
||||
self_info.name = name_;
|
||||
diag_d.setName(name_+"_data");
|
||||
|
||||
Reference in New Issue
Block a user