From: David Vossel Date: Wed, 2 Dec 2009 16:59:18 +0000 (+0000) Subject: ast_outaddrfor doesn't do htons() on port, looks odd in strace. X-Git-Tag: 1.4.28-rc1~11^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c0d5badd6d84e43ed009a6b660e1efdb3a90522;p=thirdparty%2Fasterisk.git ast_outaddrfor doesn't do htons() on port, looks odd in strace. (closes issue #16290) Reported by: wdoekes git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@232350 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/acl.c b/main/acl.c index 2cfccf1d3d..5a7017da9b 100644 --- a/main/acl.c +++ b/main/acl.c @@ -534,7 +534,7 @@ int ast_ouraddrfor(struct in_addr *them, struct in_addr *us) return -1; } sin.sin_family = AF_INET; - sin.sin_port = 5060; + sin.sin_port = htons(5060); sin.sin_addr = *them; if (connect(s, (struct sockaddr *)&sin, sizeof(sin))) { ast_log(LOG_WARNING, "Cannot connect\n");