mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
More FreeBSD fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1702,8 +1702,8 @@ int gethostbyname_r (const char *name,
|
||||
|
||||
int hsave;
|
||||
struct hostent *ph;
|
||||
static pthread_mutex_t __mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
pthread_mutex_lock(&__mutex); /* begin critical area */
|
||||
static ast_mutex_t __mutex = AST_MUTEX_INITIALIZER;
|
||||
ast_mutex_lock(&__mutex); /* begin critical area */
|
||||
hsave = h_errno;
|
||||
|
||||
ph = gethostbyname(name);
|
||||
@@ -1789,9 +1789,9 @@ int gethostbyname_r (const char *name,
|
||||
}
|
||||
h_errno = hsave; /* restore h_errno */
|
||||
|
||||
pthread_mutex_unlock(&__mutex); /* end critical area */
|
||||
ast_mutex_unlock(&__mutex); /* end critical area */
|
||||
|
||||
return (*result == NULL);
|
||||
return (*result != NULL);
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user