mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	stasis: Add function to delete topic from pool
There's been a long standing leak when using topic pools. The topics in the pool get cleaned up when the last pool reference is released but you can't remove a topic specifically. If you reloaded app_voicemail for instance, and mailboxes went away, their topics were left in the pool. * Added stasis_topic_pool_delete_topic() so modules can clean up topics from pools. * Registered the topic pool containers so it can be examined from the CLI when AO2_DEBUG is enabled. They'll be named "<topic_pool_name>-pool". Change-Id: Ib7957951ee5c9b9b4482af7b9b4349112d62bc25
This commit is contained in:
		| @@ -752,6 +752,18 @@ 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 Delete a topic from the topic pool | ||||
|  * | ||||
|  * \param pool Pool from which to delete the topic | ||||
|  * \param topic_name Name of the topic to delete | ||||
|  * | ||||
|  * \since 13.24 | ||||
|  * \since 15.6 | ||||
|  * \since 16.1 | ||||
|  */ | ||||
| void stasis_topic_pool_delete_topic(struct stasis_topic_pool *pool, const char *topic_name); | ||||
|  | ||||
| /*! | ||||
|  * \brief Check if a topic exists in a pool | ||||
|  * \param pool Pool to check | ||||
|   | ||||
		Reference in New Issue
	
	Block a user