*/
#include "dtls_config.h"
+#include "debug.h"
#include "session.h"
#ifdef HAVE_ASSERT_H
#else /* WITH_CONTIKI */
-static inline int
+INLINE_API int
_dtls_address_equals_impl(const session_t *a,
const session_t *b) {
+ if ((a == b) && (a != NULL))
+ return 1;
if (a->ifindex != b->ifindex ||
a->size != b->size || a->addr.sa.sa_family != b->addr.sa.sa_family)
return 0;
memcmp(&a->addr.sin6.sin6_addr, &b->addr.sin6.sin6_addr,
sizeof(struct in6_addr)) == 0;
default: /* fall through and signal error */
- ;
+ dtls_emerg("Could not compare dtls addresses!\n");
}
return 0;
}