mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
stasis: Reduce calculation of stasis message type hash.
When the stasis cache is used a hash is calculated for retrieving or inserting messages. This change calculates a hash when the message type is initialized that is then used each time needed. This ensures that the hash is calculated only once for the message type. Change-Id: I4fe6bfdafb55bf5c322dd313fbd8c32cce73ef37
This commit is contained in:
@@ -318,6 +318,14 @@ enum stasis_message_type_result stasis_message_type_create(const char *name,
|
||||
*/
|
||||
const char *stasis_message_type_name(const struct stasis_message_type *type);
|
||||
|
||||
/*!
|
||||
* \brief Gets the hash of a given message type
|
||||
* \param type The type to get the hash of.
|
||||
* \return The hash
|
||||
* \since 13.24.0
|
||||
*/
|
||||
unsigned int stasis_message_type_hash(const struct stasis_message_type *type);
|
||||
|
||||
/*!
|
||||
* \brief Check whether a message type is declined
|
||||
*
|
||||
|
Reference in New Issue
Block a user