[asterisk-bugs] [Asterisk 0019200]: sometimes ntohs in place of htons
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri Apr 29 12:11:18 CDT 2011
A NOTE has been added to this issue.
======================================================================
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 12:11 CDT
======================================================================
Summary: 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
======================================================================
----------------------------------------------------------------------
(0134277) pabelanger (administrator) - 2011-04-29 12:11
https://issues.asterisk.org/view.php?id=19200#c134277
----------------------------------------------------------------------
patch?
Issue History
Date Modified Username Field Change
======================================================================
2011-04-29 12:11 pabelanger Note Added: 0134277
======================================================================
More information about the asterisk-bugs
mailing list