mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-11-04 05:15:22 +00:00 
			
		
		
		
	Really fix ast_gethostbyname
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		
							
								
								
									
										2
									
								
								utils.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								utils.c
									
									
									
									
									
								
							@@ -137,7 +137,7 @@ struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp)
 | 
			
		||||
		return NULL;
 | 
			
		||||
	res = gethostbyname_r(host, &hp->hp, hp->buf, sizeof(hp->buf), &result, &herrno);
 | 
			
		||||
 | 
			
		||||
	if (res || !hp->hp.h_addr_list || !hp->hp.h_addr_list[0])
 | 
			
		||||
	if (res || !result || !hp->hp.h_addr_list || !hp->hp.h_addr_list[0])
 | 
			
		||||
		return NULL;
 | 
			
		||||
	return &hp->hp;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user