Multicast

1. Used quotes rather than angle-brackets when including
   user_settings.h.
2. Used angle-brackets rather than quotes when including
   the ThreadX and NetX headers.
3. Added a define flag to include types.h with NetX or ThreadX.
4. Added a void typecast to hush a warning about an unused variable
   in the I/O callbacks for NetX.
5. Clean up static analysis warning in the peer sequence
   number selection for DTLS.
This commit is contained in:
John Safranek
2017-01-31 15:11:34 -08:00
parent b40aad3f9e
commit fbd7f7972b
3 changed files with 11 additions and 7 deletions

View File

@ -9739,10 +9739,8 @@ static INLINE int DtlsUpdateWindow(WOLFSSL* ssl)
cur_hi = ssl->keys.curSeq_hi; cur_hi = ssl->keys.curSeq_hi;
cur_lo = ssl->keys.curSeq_lo; cur_lo = ssl->keys.curSeq_lo;
if (!ssl->options.haveMcast)
peerSeq = ssl->keys.peerSeq;
else {
#ifdef WOLFSSL_MULTICAST #ifdef WOLFSSL_MULTICAST
if (ssl->options.haveMcast) {
WOLFSSL_DTLS_PEERSEQ* p; WOLFSSL_DTLS_PEERSEQ* p;
int i; int i;
@ -9779,8 +9777,8 @@ static INLINE int DtlsUpdateWindow(WOLFSSL* ssl)
ssl->ctx->mcastSecondSeq, ssl->ctx->mcastSecondSeq,
ssl->ctx->mcastMaxSeq); ssl->ctx->mcastMaxSeq);
} }
#endif
} }
#endif
if (ssl->keys.curEpoch == peerSeq->nextEpoch) { if (ssl->keys.curEpoch == peerSeq->nextEpoch) {
next_hi = &peerSeq->nextSeq_hi; next_hi = &peerSeq->nextSeq_hi;

View File

@ -153,7 +153,7 @@
#include <wolfssl/wolfcrypt/visibility.h> #include <wolfssl/wolfcrypt/visibility.h>
#ifdef WOLFSSL_USER_SETTINGS #ifdef WOLFSSL_USER_SETTINGS
#include <user_settings.h> #include "user_settings.h"
#endif #endif
@ -174,7 +174,10 @@
#endif #endif
#ifdef HAVE_NETX #ifdef HAVE_NETX
#include "nx_api.h" #ifdef NEED_THREADX_TYPES
#include <types.h>
#endif
#include <nx_api.h>
#endif #endif
#if defined(HAVE_LWIP_NATIVE) /* using LwIP native TCP socket */ #if defined(HAVE_LWIP_NATIVE) /* using LwIP native TCP socket */

View File

@ -49,7 +49,10 @@
#endif #endif
#elif defined(THREADX) #elif defined(THREADX)
#ifndef SINGLE_THREADED #ifndef SINGLE_THREADED
#include "tx_api.h" #ifdef NEED_THREADX_TYPES
#include <types.h>
#endif
#include <tx_api.h>
#endif #endif
#elif defined(MICRIUM) #elif defined(MICRIUM)
/* do nothing, just don't pick Unix */ /* do nothing, just don't pick Unix */