[svn-commits] mjordan: branch 11 r379343 - in /branches/11: ./ addons/chan_mobile.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jan 16 20:30:32 CST 2013
Author: mjordan
Date: Wed Jan 16 20:30:29 2013
New Revision: 379343
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379343
Log:
Fix issue where chan_mobile fails to bind to first available port
Per the bluez API, in order to bind to the first available port, the rc_channel
field of the socket addressing structure used to bind the socket should be set
to 0. Previously, Asterisk had set the rc_channel field set to 1, causing it
to connect to whatever happens to be on port 1.
We could probably not explicitly set rc_channel to 0 since we memset the struct
earlier, but explicitly setting it will hopefully prevent someone from coming
in and setting it to some explicit port in the future.
(closes issue ASTERISK-16357)
Reported by: challado
Tested by: Alexander Heinz, Nikolay Ilduganov, benjamin, eliafino, David van Geyn
patches:
ASTERISK-16357.diff uploaded by Nikolay Ilduganov (license 6253)
........
Merged revisions 379342 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/11/ (props changed)
branches/11/addons/chan_mobile.c
Propchange: branches/11/
------------------------------------------------------------------------------
--- branch-1.8-merged (original)
+++ branch-1.8-merged Wed Jan 16 20:30:29 2013
@@ -1,1 +1,1 @@
-/branches/1.8:1-378147,378164,378356,378375,378427,378455-378456,378486,378514,378554,378591,378733,378776,378933,378967,379001,379145,379178,379226,379276,379310
+/branches/1.8:1-378147,378164,378356,378375,378427,378455-378456,378486,378514,378554,378591,378733,378776,378933,378967,379001,379145,379178,379226,379276,379310,379342
Modified: branches/11/addons/chan_mobile.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/addons/chan_mobile.c?view=diff&rev=379343&r1=379342&r2=379343
==============================================================================
--- branches/11/addons/chan_mobile.c (original)
+++ branches/11/addons/chan_mobile.c Wed Jan 16 20:30:29 2013
@@ -1367,7 +1367,7 @@
memset(&addr, 0, sizeof(addr));
addr.rc_family = AF_BLUETOOTH;
bacpy(&addr.rc_bdaddr, &src);
- addr.rc_channel = (uint8_t) 1;
+ addr.rc_channel = (uint8_t) 0;
if (bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
ast_debug(1, "bind() failed (%d).\n", errno);
close(s);
More information about the svn-commits
mailing list