File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ typedef unsigned char byte;
1919#define HOMEKIT_LOG_DEBUG 3
2020
2121#ifndef HOMEKIT_LOG_LEVEL
22- #define HOMEKIT_LOG_LEVEL HOMEKIT_LOG_DEBUG
22+ #define HOMEKIT_LOG_LEVEL HOMEKIT_NO_LOG
2323#endif
2424
2525#define HOMEKIT_PRINTF XPGM_PRINTF
Original file line number Diff line number Diff line change @@ -102,7 +102,10 @@ bool homekit_storage_magic_valid() {
102102}
103103
104104bool homekit_storage_set_magic () {
105- if (!spiflash_write (MAGIC_ADDR , (byte * )hap_magic , sizeof (hap_magic ))) {
105+ char magic [sizeof (hap_magic )];
106+ memcpy (magic , hap_magic , sizeof (magic ));
107+
108+ if (!spiflash_write (MAGIC_ADDR , (byte * )magic , sizeof (magic ))) {
106109 ERROR ("Failed to write HomeKit storage magic" );
107110 return false;
108111 }
You can’t perform that action at this time.
0 commit comments