소스 검색

Correct typo (name resolution could fail on some platforms)

z3APA3A 5 년 전
부모
커밋
1fd759d327
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/common.c

+ 1 - 1
src/common.c

@@ -911,7 +911,7 @@ unsigned long getip46(int family, unsigned char *name,  struct sockaddr *sa){
 
 	detect = afdetect(name);
 	if(detect != -1){
-		if(family == 4 && detect != 4) return 0;
+		if(family == 4 && detect != AF_INET) return 0;
 		*SAFAMILY(sa) = (family == 6)? AF_INET6 : detect;
 		return inet_pton(*SAFAMILY(sa), (char *)name, SAADDR(sa))? *SAFAMILY(sa) : 0; 
 	}