mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	res_ari_events: Add module reference when a WebSocket is open.
This change ensures that the module isn't unloaded when a WebSocket is open. Previously it was possible to unload the module manually or during shutdown which could cause a crash when any active WebSockets were terminated. ASTERISK-28585 Change-Id: I85c71ab112f99875b586419a34c08c8b34c14c5c
This commit is contained in:
		| @@ -211,6 +211,8 @@ static void ast_ari_{{c_name}}_{{c_nickname}}_ws_established_cb(struct ast_webso | ||||
| 	struct ast_variable *path_vars = NULL; | ||||
| {{/has_path_parameters}} | ||||
|  | ||||
| 	SCOPED_MODULE_USE(ast_module_info->self); | ||||
|  | ||||
| {{#has_parameters}} | ||||
| 	response = ast_calloc(1, sizeof(*response)); | ||||
| 	if (!response) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user