aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2011-05-03 22:16:23 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2011-05-03 22:16:23 +0000
commit4c31171c4cb022cd5babe51a20032782c53cdd18 (patch)
tree2202a650849e9a203d80bbd13abbd2a5716881f7
parentbfd1847e23e00629ccb0890f1baeb93751ad598f (diff)
Merged revisions 316336 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r316336 | russell | 2011-05-03 17:13:31 -0500 (Tue, 03 May 2011) | 8 lines Use htons() instead of ntohs() in some places. (closes issue #19200) Reported by: wdoekes Patches: issue19200-trunk.patch uploaded by wdoekes (license 717) issue19200-1.8.x.patch uploaded by wdoekes (license 717) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@316337 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_mgcp.c2
-rw-r--r--channels/chan_skinny.c2
-rw-r--r--pbx/pbx_dundi.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index e98b24f61..f71948bd4 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -4746,7 +4746,7 @@ static int reload_config(int reload)
memcpy(&__ourip, hp->h_addr, sizeof(__ourip));
}
if (!ntohs(bindaddr.sin_port))
- bindaddr.sin_port = ntohs(DEFAULT_MGCP_CA_PORT);
+ bindaddr.sin_port = htons(DEFAULT_MGCP_CA_PORT);
bindaddr.sin_family = AF_INET;
ast_mutex_lock(&netlock);
if (mgcpsock > -1)
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index fb2a50434..9f4aa54b0 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -7204,7 +7204,7 @@ static struct ast_channel *skinny_request(const char *type, struct ast_format_ca
memcpy(&__ourip, hp->h_addr, sizeof(__ourip));
}
if (!ntohs(bindaddr.sin_port)) {
- bindaddr.sin_port = ntohs(DEFAULT_SKINNY_PORT);
+ bindaddr.sin_port = htons(DEFAULT_SKINNY_PORT);
}
bindaddr.sin_family = AF_INET;
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index e02eddabe..e95118cce 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -4678,7 +4678,7 @@ static int set_config(char *config_file, struct sockaddr_in* sin, int reload)
v = ast_variable_browse(cfg, "general");
while(v) {
if (!strcasecmp(v->name, "port")){
- sin->sin_port = ntohs(atoi(v->value));
+ sin->sin_port = htons(atoi(v->value));
if(last_port==0){
last_port=sin->sin_port;
} else if(sin->sin_port != last_port)
@@ -4831,7 +4831,7 @@ static int load_module(void)
dundi_set_error(dundi_error_output);
sin.sin_family = AF_INET;
- sin.sin_port = ntohs(DUNDI_PORT);
+ sin.sin_port = htons(DUNDI_PORT);
sin.sin_addr.s_addr = INADDR_ANY;
/* Make a UDP socket */