diff --git a/hashkey.c b/hashkey.c index a9136da4..828b5194 100644 --- a/hashkey.c +++ b/hashkey.c @@ -8,6 +8,9 @@ #include "hashkey.h" +/* Caution: When changing this, update COAP_DEFAULT_WKC_HASHKEY + * accordingly (see int coap_hash_path()); + */ void coap_hash_impl(const unsigned char *s, unsigned int len, coap_key_t h) { size_t j; diff --git a/hashkey.h b/hashkey.h index 0ee950a7..4732a703 100644 --- a/hashkey.h +++ b/hashkey.h @@ -33,6 +33,11 @@ void coap_hash_impl(const unsigned char *s, unsigned int len, coap_key_t h); #define coap_hash(String,Length,Result) \ coap_hash_impl((String),(Length),(Result)) + +/* This is used to control the pre-set hash-keys for resources. */ +#define __COAP_DEFAULT_HASH +#else +#undef __COAP_DEFAULT_HASH #endif /* coap_hash */ /**