From 0188e8a2ae6421be7c6ce49266661e2cd771cca4 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 27 Jan 2018 16:43:50 +0100 Subject: [PATCH] PJONMaster ensure rid uniqueness on PJON_ID_REFRESH request --- PJONMaster.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PJONMaster.h b/PJONMaster.h index 73750dc8a1..7b82b43c92 100644 --- a/PJONMaster.h +++ b/PJONMaster.h @@ -87,7 +87,7 @@ class PJONMaster : public PJON { /* Add a device reference: */ bool add_id(uint8_t id, uint32_t rid, bool state) { - if(!ids[id - 1].state && !ids[id - 1].rid) { + if(unique_rid(rid) && !ids[id - 1].state && !ids[id - 1].rid) { ids[id - 1].rid = rid; ids[id - 1].state = state; return true;