[asterisk-commits] rmudgett: branch 13 r422661 - in /branches/13: channels/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Sep 5 12:36:42 CDT 2014
Author: rmudgett
Date: Fri Sep 5 12:36:35 2014
New Revision: 422661
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=422661
Log:
devicestate.c: Minor tweaks
* In ast_state_chan2dev() use ARRAY_LEN() instead of a sentinel value in
chan2dev[].
* Fix some comments in chan_iax2.c.
Modified:
branches/13/channels/chan_iax2.c
branches/13/main/devicestate.c
Modified: branches/13/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/channels/chan_iax2.c?view=diff&rev=422661&r1=422660&r2=422661
==============================================================================
--- branches/13/channels/chan_iax2.c (original)
+++ branches/13/channels/chan_iax2.c Fri Sep 5 12:36:35 2014
@@ -5036,7 +5036,7 @@
* password field will be set to NULL.
*
* \note The dial string format is:
- * [username[:password]@]peer[:port][/exten[@@context]][/options]
+ * [username[:password]@]peer[:port][/exten[@context]][/options]
*/
static void parse_dial_string(char *data, struct parsed_dial_string *pds)
{
@@ -5069,9 +5069,10 @@
pds->peer = strsep(&data, ":");
pds->port = data;
- /* check for a key name wrapped in [] in the secret position, if found,
- move it to the key field instead
- */
+ /*
+ * Check for a key name wrapped in [] in the password position.
+ * If found, move it to the key field instead.
+ */
if (pds->password && (pds->password[0] == '[')) {
pds->key = ast_strip_quoted(pds->password, "[", "]");
pds->password = NULL;
Modified: branches/13/main/devicestate.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/main/devicestate.c?view=diff&rev=422661&r1=422660&r2=422661
==============================================================================
--- branches/13/main/devicestate.c (original)
+++ branches/13/main/devicestate.c Fri Sep 5 12:36:35 2014
@@ -169,7 +169,7 @@
{ /* 5 AST_DEVICE_UNAVAILABLE */ "Unavailable", "UNAVAILABLE" }, /*!< Unavailable (not registered) */
{ /* 6 AST_DEVICE_RINGING */ "Ringing", "RINGING" }, /*!< Ring, ring, ring */
{ /* 7 AST_DEVICE_RINGINUSE */ "Ring+Inuse", "RINGINUSE" }, /*!< Ring and in use */
- { /* 8 AST_DEVICE_ONHOLD */ "On Hold", "ONHOLD" }, /*!< On Hold */
+ { /* 8 AST_DEVICE_ONHOLD */ "On Hold", "ONHOLD" }, /*!< On Hold */
};
/*!\brief Mapping for channel states to device states */
@@ -187,7 +187,6 @@
{ AST_STATE_BUSY, AST_DEVICE_BUSY },
{ AST_STATE_DIALING_OFFHOOK, AST_DEVICE_INUSE },
{ AST_STATE_PRERING, AST_DEVICE_RINGING },
- { -100, -100 },
};
/*! \brief A device state provider (not a channel) */
@@ -251,7 +250,7 @@
{
int i;
chanstate &= 0xFFFF;
- for (i = 0; chan2dev[i].chan != -100; i++) {
+ for (i = 0; i < ARRAY_LEN(chan2dev); i++) {
if (chan2dev[i].chan == chanstate) {
return chan2dev[i].dev;
}
More information about the asterisk-commits
mailing list