[asterisk-commits] branch 1.2 r34627 - in /branches/1.2: channels/
configs/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Jun 18 13:15:16 MST 2006
Author: russell
Date: Sun Jun 18 15:15:15 2006
New Revision: 34627
URL: http://svn.digium.com/view/asterisk?rev=34627&view=rev
Log:
don't store multiple secrets delimited with semicolons for peers because this
is only valid for users. Instead, only keep the last specified secret for a
peer entry. Also, document how multiple secrets are handled in the sample
config. (Reported by PCadach on #asterisk-bugs)
Modified:
branches/1.2/channels/chan_iax2.c
branches/1.2/configs/iax.conf.sample
Modified: branches/1.2/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_iax2.c?rev=34627&r1=34626&r2=34627&view=diff
==============================================================================
--- branches/1.2/channels/chan_iax2.c (original)
+++ branches/1.2/channels/chan_iax2.c Sun Jun 18 15:15:15 2006
@@ -8191,11 +8191,7 @@
peer->peercontext[0] = '\0';
while(v) {
if (!strcasecmp(v->name, "secret")) {
- if (!ast_strlen_zero(peer->secret)) {
- strncpy(peer->secret + strlen(peer->secret), ";", sizeof(peer->secret)-strlen(peer->secret) - 1);
- strncpy(peer->secret + strlen(peer->secret), v->value, sizeof(peer->secret)-strlen(peer->secret) - 1);
- } else
- ast_copy_string(peer->secret, v->value, sizeof(peer->secret));
+ ast_copy_string(peer->secret, v->value, sizeof(peer->secret));
} else if (!strcasecmp(v->name, "mailbox")) {
ast_copy_string(peer->mailbox, v->value, sizeof(peer->mailbox));
} else if (!strcasecmp(v->name, "dbsecret")) {
Modified: branches/1.2/configs/iax.conf.sample
URL: http://svn.digium.com/view/asterisk/branches/1.2/configs/iax.conf.sample?rev=34627&r1=34626&r2=34627&view=diff
==============================================================================
--- branches/1.2/configs/iax.conf.sample (original)
+++ branches/1.2/configs/iax.conf.sample Sun Jun 18 15:15:15 2006
@@ -412,7 +412,9 @@
;type=friend
;host=dynamic
;regexten=1234
-;secret=moofoo
+;secret=moofoo ; Multiple secrets may be specified. For a "user", all
+;secret=foomoo ; specified entries will be accepted as valid. For a "peer",
+;secret=shazbot ; only the last specified secret will be used.
;context=default
;permit=0.0.0.0/0.0.0.0
More information about the asterisk-commits
mailing list