mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 20:13:44 +02:00
Can't send a user message to self.
This commit is contained in:
parent
823a1963f6
commit
d7e7ad4f88
1 changed files with 10 additions and 9 deletions
|
@ -476,15 +476,16 @@ void Node::clearLocalInterfaceAddresses()
|
||||||
int Node::sendUserMessage(uint64_t dest,uint64_t typeId,const void *data,unsigned int len)
|
int Node::sendUserMessage(uint64_t dest,uint64_t typeId,const void *data,unsigned int len)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
Packet outp(Address(dest),RR->identity.address(),Packet::VERB_USER_MESSAGE);
|
if (RR->identity.address().toInt() != dest) {
|
||||||
outp.append(typeId);
|
Packet outp(Address(dest),RR->identity.address(),Packet::VERB_USER_MESSAGE);
|
||||||
outp.append(data,len);
|
outp.append(typeId);
|
||||||
outp.compress();
|
outp.append(data,len);
|
||||||
RR->sw->send(outp,true);
|
outp.compress();
|
||||||
return 1;
|
RR->sw->send(outp,true);
|
||||||
} catch ( ... ) {
|
return 1;
|
||||||
return 0;
|
}
|
||||||
}
|
} catch ( ... ) {}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Node::setRole(uint64_t ztAddress,ZT_PeerRole role)
|
void Node::setRole(uint64_t ztAddress,ZT_PeerRole role)
|
||||||
|
|
Loading…
Add table
Reference in a new issue