mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	gethostbyname isn't reentrant, who knew...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		
							
								
								
									
										3
									
								
								acl.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								acl.c
									
									
									
									
									
								
							| @@ -139,7 +139,8 @@ int ast_apply_ha(struct ast_ha *ha, struct sockaddr_in *sin) | ||||
| int ast_get_ip(struct sockaddr_in *sin, char *value) | ||||
| { | ||||
| 	struct hostent *hp; | ||||
| 	hp = gethostbyname(value); | ||||
| 	struct ast_hostent ahp; | ||||
| 	hp = ast_gethostbyname(value, &ahp); | ||||
| 	if (hp) { | ||||
| 		memcpy(&sin->sin_addr, hp->h_addr, sizeof(sin->sin_addr)); | ||||
| 	} else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user