mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	res_pjsip: Move tenantid to end of ast_sip_endpoint
The tenantid field was originally added to the ast_sip_endpoint structure at the end of the AST_DECLARE_STRING_FIELDS block. This caused everything after it in the structure to move down in memory and break ABI compatibility. It's now at the end of the structure as an AST_STRING_FIELD_EXTENDED. Given the number of string fields in the structure now, the initial string field allocation was also increased from 64 to 128 bytes. Resolves: #982
This commit is contained in:
		
				
					committed by
					
						![asterisk-org-access-app[bot]](/avatar/58a64b62d62d5b23df7bc832f016f9db?size=40) asterisk-org-access-app[bot]
						asterisk-org-access-app[bot]
					
				
			
			
				
	
			
			
			
						parent
						
							47ce55885b
						
					
				
				
					commit
					5a335b880d
				
			| @@ -2383,7 +2383,7 @@ void *ast_sip_endpoint_alloc(const char *name) | ||||
| 	if (!endpoint) { | ||||
| 		return NULL; | ||||
| 	} | ||||
| 	if (ast_string_field_init(endpoint, 64)) { | ||||
| 	if (ast_string_field_init(endpoint, 128)) { | ||||
| 		ao2_cleanup(endpoint); | ||||
| 		return NULL; | ||||
| 	} | ||||
| @@ -2393,6 +2393,10 @@ void *ast_sip_endpoint_alloc(const char *name) | ||||
| 		ao2_cleanup(endpoint); | ||||
| 		return NULL; | ||||
| 	} | ||||
| 	if (ast_string_field_init_extended(endpoint, tenantid)) { | ||||
| 		ao2_cleanup(endpoint); | ||||
| 		return NULL; | ||||
| 	} | ||||
|  | ||||
| 	if (!(endpoint->media.codecs = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT))) { | ||||
| 		ao2_cleanup(endpoint); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user