mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
move findNode method back
Signed-off-by: Grant Limberg <glimberg@gmail.com>
This commit is contained in:
parent
d66f2cd54d
commit
6ff2e6ecfe
2 changed files with 12 additions and 11 deletions
|
@ -50,16 +50,6 @@ jobject createResultObject(JNIEnv *env, ZT1_ResultCode code)
|
||||||
return resultObject;
|
return resultObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZT1_Node* findNode(uint64_t nodeId)
|
|
||||||
{
|
|
||||||
NodeMap::iterator found = nodeMap.find(nodeId);
|
|
||||||
if(found != nodeMap.end())
|
|
||||||
{
|
|
||||||
JniRef *ref = found->second;
|
|
||||||
return ref->node;
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
jobject createVirtualNetworkStatus(JNIEnv *env, ZT1_VirtualNetworkStatus status)
|
jobject createVirtualNetworkStatus(JNIEnv *env, ZT1_VirtualNetworkStatus status)
|
||||||
{
|
{
|
||||||
|
|
|
@ -123,6 +123,17 @@ namespace {
|
||||||
|
|
||||||
typedef std::map<uint64_t, JniRef*> NodeMap;
|
typedef std::map<uint64_t, JniRef*> NodeMap;
|
||||||
static NodeMap nodeMap;
|
static NodeMap nodeMap;
|
||||||
|
|
||||||
|
ZT1_Node* findNode(uint64_t nodeId)
|
||||||
|
{
|
||||||
|
NodeMap::iterator found = nodeMap.find(nodeId);
|
||||||
|
if(found != nodeMap.end())
|
||||||
|
{
|
||||||
|
JniRef *ref = found->second;
|
||||||
|
return ref->node;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue