diff --git a/srtp/srtp.c b/srtp/srtp.c index f0a4f6886..fe7502095 100644 --- a/srtp/srtp.c +++ b/srtp/srtp.c @@ -4838,6 +4838,12 @@ srtp_err_status_t srtp_get_stream_roc(srtp_t session, return srtp_err_status_ok; } +#define SRTP_STREAM_HASH_SIZE 32 + +struct srtp_stream_hash_t_ { + srtp_stream_list_t *list; +} srtp_stream_hash_t_; + #ifndef SRTP_NO_STREAM_LIST /* in the default implementation, we have an intrusive doubly-linked list */ @@ -4847,12 +4853,6 @@ typedef struct srtp_stream_list_ctx_t_ { srtp_stream_ctx_t data; } srtp_stream_list_ctx_t_; -#define SRTP_STREAM_HASH_SIZE 32 - -struct srtp_stream_hash_t_ { - srtp_stream_list_t *list; -} srtp_stream_hash_t_; - srtp_err_status_t srtp_stream_list_alloc(srtp_stream_list_t *list_ptr) { srtp_stream_list_t list = @@ -4931,6 +4931,8 @@ void srtp_stream_list_for_each(srtp_stream_list_t list, } } +#endif + srtp_err_status_t srtp_stream_hash_alloc(srtp_stream_hash_t *hash_ptr) { srtp_stream_hash_t hash = srtp_crypto_alloc(sizeof(srtp_stream_hash_t_)); @@ -5019,5 +5021,3 @@ void srtp_stream_hash_for_each(srtp_stream_hash_t hash, srtp_stream_list_for_each(list, callback, data); } } - -#endif