mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
devicestate: Don't create topic when change isn't cached.
When publishing a device state the change can be marked as being cachable or not. If it is not cached the change is just published to all interested and not stored away for later query. This was not fully taken into account when publishing in stasis. The act of publishing would create a topic for the device even if it may be ephemeral. This change makes it so messages which are not cached won't create a topic for the device. If a topic does already exist it will be published to but otherwise the change will only be published to the device state all topic. ASTERISK-27591 Change-Id: I18da0e8cbb18e79602e731020c46ba4101e59f0a
This commit is contained in:
@@ -744,6 +744,16 @@ struct stasis_topic_pool *stasis_topic_pool_create(struct stasis_topic *pooled_t
|
||||
*/
|
||||
struct stasis_topic *stasis_topic_pool_get_topic(struct stasis_topic_pool *pool, const char *topic_name);
|
||||
|
||||
/*!
|
||||
* \brief Check if a topic exists in a pool
|
||||
* \param pool Pool to check
|
||||
* \param topic_name Name of the topic to check
|
||||
* \retval 1 exists
|
||||
* \retval 0 does not exist
|
||||
* \since 13.23.0
|
||||
*/
|
||||
int stasis_topic_pool_topic_exists(const struct stasis_topic_pool *pool, const char *topic_name);
|
||||
|
||||
/*! \addtogroup StasisTopicsAndMessages
|
||||
* @{
|
||||
*/
|
||||
|
Reference in New Issue
Block a user