mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
Create reentrant ast_inet_ntoa and replace all inet_ntoa's with ast_inet_ntoa's (but #1944)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
7
utils.c
7
utils.c
@@ -12,6 +12,9 @@
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <asterisk/lock.h>
|
||||
#include <asterisk/utils.h>
|
||||
|
||||
@@ -325,6 +328,10 @@ static void base64_init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *ast_inet_ntoa(char *buf, int bufsiz, struct in_addr ia)
|
||||
{
|
||||
return inet_ntop(AF_INET, &ia, buf, bufsiz);
|
||||
}
|
||||
|
||||
int ast_utils_init(void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user