mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-18 15:49:56 +00:00
Use INET_ADDRLEN (bug #1956) (from airport!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -45,7 +45,7 @@ static void (*errorf)(const char *str) = internalerror;
|
||||
static void dump_addr(char *output, int maxlen, void *value, int len)
|
||||
{
|
||||
struct sockaddr_in sin;
|
||||
char iabuf[80];
|
||||
char iabuf[INET_ADDRSTRLEN];
|
||||
if (len == (int)sizeof(sin)) {
|
||||
memcpy(&sin, value, len);
|
||||
snprintf(output, maxlen, "IPV4 %s:%d", ast_inet_ntoa(iabuf, sizeof(iabuf), sin.sin_addr), ntohs(sin.sin_port));
|
||||
@@ -254,7 +254,7 @@ void iax_showframe(struct iax_frame *f, struct ast_iax2_full_hdr *fhi, int rx, s
|
||||
char *class;
|
||||
char *subclass;
|
||||
char tmp[256];
|
||||
char iabuf[80];
|
||||
char iabuf[INET_ADDRSTRLEN];
|
||||
if (f) {
|
||||
fh = f->data;
|
||||
snprintf(retries, (int)sizeof(retries), "%03d", f->retries);
|
||||
|
||||
Reference in New Issue
Block a user