diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-28 19:11:53 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-28 19:11:53 +0000 |
commit | 3b8eb12249acc807bcf9c371b10cd39c98668657 (patch) | |
tree | 9dc486abdad4d35fea7e235ed394b336fbd83f6d /channels/chan_sip.c | |
parent | b0b75b7c00c33e045d8a7c665c32d90782a11594 (diff) |
Merged revisions 220718 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r220718 | jpeeler | 2009-09-28 14:10:10 -0500 (Mon, 28 Sep 2009) | 10 lines
Fix building of registration entry in build_peer when using callbackextension
Check for remotesecret option was unintentionally always true, which therefore
caused the secret option to never be used. Thanks to dvossel for pointing out
the exact fix.
(closes issue #15943)
Reported by: tpsast
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@220722 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index ade8c64dc..791dd8be8 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -23539,7 +23539,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str ast_free_ha(oldha); if (!ast_strlen_zero(callback)) { /* build string from peer info */ char *reg_string; - if (asprintf(®_string, "%s?%s:%s@%s/%s", peer->name, peer->username, peer->remotesecret ? peer->remotesecret : peer->secret, peer->tohost, callback) < 0) { + if (asprintf(®_string, "%s?%s:%s@%s/%s", peer->name, peer->username, !ast_strlen_zero(peer->remotesecret) ? peer->remotesecret : peer->secret, peer->tohost, callback) < 0) { ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno)); } else if (reg_string) { sip_register(reg_string, 0); /* XXX TODO: count in registry_count */ |