diff options
author | Russell Bryant <russell@russellbryant.com> | 2006-06-18 20:18:41 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2006-06-18 20:18:41 +0000 |
commit | 035a8b4278c2f8ac87506e0b7d43ecb83629ad1b (patch) | |
tree | 956ff4e088d80968e2133aaa6aa28739baf79afe | |
parent | 829583a3dcc42b269d93a5e20747b5c8c141985c (diff) |
Merged revisions 34627 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r34627 | russell | 2006-06-18 16:15:15 -0400 (Sun, 18 Jun 2006) | 5 lines
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)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | channels/chan_iax2.c | 6 | ||||
-rw-r--r-- | configs/iax.conf.sample | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 82ddfbfb5..7442a06b3 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -8351,11 +8351,7 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, in 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")) { diff --git a/configs/iax.conf.sample b/configs/iax.conf.sample index 62277b8af..0d2f27093 100644 --- a/configs/iax.conf.sample +++ b/configs/iax.conf.sample @@ -377,7 +377,9 @@ host=216.207.245.47 ;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 |