(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: https://origsvn.digium.com/svn/asterisk/branches/1.8@316336
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
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)
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;
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)
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 */