[asterisk-bugs] [Asterisk 0019200]: [patch] sometimes ntohs in place of htons
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri Apr 29 15:37:25 CDT 2011
The following issue has been UPDATED.
======================================================================
https://issues.asterisk.org/view.php?id=19200
======================================================================
Reported By: wdoekes
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 19200
Category: General
Reproducibility: always
Severity: trivial
Priority: normal
Status: new
Asterisk Version: SVN
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 315895
Request Review:
======================================================================
Date Submitted: 2011-04-29 01:54 CDT
Last Modified: 2011-04-29 15:37 CDT
======================================================================
Summary: [patch] sometimes ntohs in place of htons
Description:
Hi,
in a couple of places ntohs is used where htons should be used. This is
not a problem, as they should both be a no-op (big endian) or both swap the
bytes (little endian).
asterisk-svn$ wgrep . 'sin_port = ntohs'
./channels/chan_skinny.c: bindaddr.sin_port =
ntohs(DEFAULT_SKINNY_PORT);
./channels/chan_mgcp.c: bindaddr.sin_port = ntohs(DEFAULT_MGCP_CA_PORT);
./pbx/pbx_dundi.c: sin->sin_port = ntohs(atoi(v->value));
./pbx/pbx_dundi.c: sin.sin_port = ntohs(DUNDI_PORT);
asterisk-1.6.2.x$ wgrep . 'sin_port = ntohs'
./channels/chan_skinny.c: bindaddr.sin_port =
ntohs(DEFAULT_SKINNY_PORT);
./channels/chan_mgcp.c: bindaddr.sin_port = ntohs(DEFAULT_MGCP_CA_PORT);
./channels/chan_sip.c: p->ourip.sin_port = ntohs(port);
./pbx/pbx_dundi.c: sin->sin_port = ntohs(atoi(v->value));
./pbx/pbx_dundi.c: sin.sin_port = ntohs(DUNDI_PORT);
Fix: s/ntohs/htons/ in the above locations.
Regards,
Walter
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2011-04-29 15:37 wdoekes Summary sometimes ntohs in
place of htons => [patch] sometimes ntohs in place of htons
======================================================================
More information about the asterisk-bugs
mailing list