From 52a977d2f11ddc9e18ffbc7e26d927c0e17faa82 Mon Sep 17 00:00:00 2001 From: Gregg Date: Thu, 19 May 2022 10:18:00 -0500 Subject: [PATCH] Revert "sort Accessories by AID to ensure same order all the time during dynamic changes" This reverts commit 2e98b163b20aef2fc1a405d8a935abee26645a3f. --- src/HomeSpan.cpp | 3 --- src/HomeSpan.h | 1 - 2 files changed, 4 deletions(-) diff --git a/src/HomeSpan.cpp b/src/HomeSpan.cpp index 5479398..757eddd 100644 --- a/src/HomeSpan.cpp +++ b/src/HomeSpan.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include "HomeSpan.h" #include "HAP.h" @@ -1472,8 +1471,6 @@ int Span::sprintfAttributes(char **ids, int numIDs, int flags, char *cBuf){ boolean Span::updateDatabase(boolean updateMDNS){ - std::sort(Accessories.begin(),Accessories.end(),SpanAccessory::compare); - uint8_t tHash[48]; TempBuffer tBuf(sprintfAttributes(NULL,GET_META|GET_PERMS|GET_TYPE|GET_DESC)+1); sprintfAttributes(tBuf.buf,GET_META|GET_PERMS|GET_TYPE|GET_DESC); diff --git a/src/HomeSpan.h b/src/HomeSpan.h index 5fe0739..966de42 100644 --- a/src/HomeSpan.h +++ b/src/HomeSpan.h @@ -288,7 +288,6 @@ struct SpanAccessory{ ~SpanAccessory(); int sprintfAttributes(char *cBuf, int flags); // prints Accessory JSON database into buf, unless buf=NULL; return number of characters printed, excluding null terminator, even if buf=NULL - static boolean compare(SpanAccessory *a, SpanAccessory *b){return(a->aidaid);} }; ///////////////////////////////