mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-14 02:27:38 -07:00
Add a network-associated user ptr in API.
This commit is contained in:
parent
3edfbfec93
commit
83ef98a9dc
9 changed files with 68 additions and 46 deletions
|
@ -506,7 +506,7 @@ unsigned int ControlPlane::handleRequest(
|
|||
} else if (ps[0] == "network") {
|
||||
if (ps.size() == 2) {
|
||||
uint64_t wantnw = Utils::hexStrToU64(ps[1].c_str());
|
||||
_node->join(wantnw); // does nothing if we are a member
|
||||
_node->join(wantnw,(void *)0); // does nothing if we are a member
|
||||
ZT_VirtualNetworkList *nws = _node->networks();
|
||||
if (nws) {
|
||||
for(unsigned long i=0;i<nws->networkCount;++i) {
|
||||
|
@ -546,7 +546,7 @@ unsigned int ControlPlane::handleRequest(
|
|||
uint64_t wantnw = Utils::hexStrToU64(ps[1].c_str());
|
||||
for(unsigned long i=0;i<nws->networkCount;++i) {
|
||||
if (nws->networks[i].nwid == wantnw) {
|
||||
_node->leave(wantnw);
|
||||
_node->leave(wantnw,(void **)0);
|
||||
responseBody = "true";
|
||||
responseContentType = "application/json";
|
||||
scode = 200;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue