Skip to content

Commit 9f123a0

Browse files
authored
Merge pull request #1 from Yurik72/master
Upstream
2 parents de69b88 + abee258 commit 9f123a0

7 files changed

Lines changed: 8 additions & 6 deletions

File tree

.vs/ESPHap/v15/.suo

0 Bytes
Binary file not shown.

.vs/slnx.sqlite

0 Bytes
Binary file not shown.

arduino_homekit_server.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2073,6 +2073,7 @@ void homekit_server_on_pair_verify(client_context_t *context, const byte *data,
20732073
tlv_free(decrypted_message);
20742074
pair_verify_context_free(context->verify_context);
20752075
context->verify_context = NULL;
2076+
20762077
send_tlv_error_response(context, 4, TLVError_Authentication);
20772078
break;
20782079
}

examples/EspHap_GarageDoor/EspHap_GarageDoor.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extern "C"{
3333
#ifdef ESP8266
3434
#include "homekitintegrationcpp.h"
3535
#endif
36-
#include <hapfilestorage\hapfilestorage.hpp>
36+
#include <hapfilestorage/hapfilestorage.hpp>
3737

3838

3939

examples/EspHap_WindowCovering/EspHap_WindowCovering.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ extern "C"{
4141
#ifdef ESP8266
4242
#include "homekitintegrationcpp.h"
4343
#endif
44-
#include <hapfilestorage\hapfilestorage.hpp>
44+
#include <hapfilestorage/hapfilestorage.hpp>
4545

4646

4747

homeintegration.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include "storage.h"
3434
#include "storage_ex.h"
3535

36-
#define MAX_SERVICES 20
36+
//#define MAX_SERVICES 20
3737

3838

3939
static callback_storagechanged callbackstorage_integration=NULL;

server.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,6 +1966,7 @@ void homekit_server_on_pair_verify(client_context_t *context, const byte *data,
19661966
CLIENT_ERROR(context, "Failed to verify device signature (code %d)", r);
19671967

19681968
pair_verify_context_free(context->verify_context);
1969+
homekit_storage_pairing_free(pairing);
19691970
context->verify_context = NULL;
19701971

19711972
send_tlv_error_response(context, 4, TLVError_Authentication);
@@ -1991,7 +1992,7 @@ void homekit_server_on_pair_verify(client_context_t *context, const byte *data,
19911992

19921993
pair_verify_context_free(context->verify_context);
19931994
context->verify_context = NULL;
1994-
1995+
homekit_storage_pairing_free(pairing);
19951996
send_tlv_error_response(context, 4, TLVError_Unknown);
19961997
break;
19971998
}
@@ -2012,7 +2013,7 @@ void homekit_server_on_pair_verify(client_context_t *context, const byte *data,
20122013
if (r) {
20132014
CLIENT_ERROR(context, "Failed to derive write encryption key (code %d)", r);
20142015

2015-
2016+
homekit_storage_pairing_free(pairing);
20162017
send_tlv_error_response(context, 4, TLVError_Unknown);
20172018
break;
20182019
}
@@ -2025,7 +2026,7 @@ void homekit_server_on_pair_verify(client_context_t *context, const byte *data,
20252026
context->pairing_id = pairing_id;
20262027
context->permissions = permissions;
20272028
context->encrypted = true;
2028-
2029+
homekit_storage_pairing_free(pairing);
20292030
HOMEKIT_NOTIFY_EVENT(context->server, HOMEKIT_EVENT_CLIENT_VERIFIED);
20302031

20312032
CLIENT_INFO(context, "Verification successful, secure session established");

0 commit comments

Comments
 (0)