mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
add ability to remove neighbour via cli
This commit is contained in:
parent
08b49c3ac5
commit
2d5016bac3
3 changed files with 23 additions and 0 deletions
|
|
@ -719,6 +719,17 @@ public:
|
|||
*dp = 0; // null terminator
|
||||
}
|
||||
|
||||
void removeNeighbor(const uint8_t* pubkey, int key_len) override {
|
||||
#if MAX_NEIGHBOURS
|
||||
for (int i = 0; i < MAX_NEIGHBOURS; i++) {
|
||||
NeighbourInfo* neighbour = &neighbours[i];
|
||||
if(memcmp(neighbour->id.pub_key, pubkey, key_len) == 0){
|
||||
neighbours[i] = {}; // clear neighbour entry
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
mesh::LocalIdentity& getSelfId() override { return self_id; }
|
||||
|
||||
void clearStats() override {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue