[asterisk-commits] jpeeler: branch 1.6.2 r220722 - in /branches/1.6.2: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 28 14:11:59 CDT 2009


Author: jpeeler
Date: Mon Sep 28 14:11:53 2009
New Revision: 220722

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=220722
Log:
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
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/channels/chan_sip.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/channels/chan_sip.c?view=diff&rev=220722&r1=220721&r2=220722
==============================================================================
--- branches/1.6.2/channels/chan_sip.c (original)
+++ branches/1.6.2/channels/chan_sip.c Mon Sep 28 14:11:53 2009
@@ -23539,7 +23539,7 @@
 	ast_free_ha(oldha);
 	if (!ast_strlen_zero(callback)) { /* build string from peer info */
 		char *reg_string;
-		if (asprintf(&reg_string, "%s?%s:%s@%s/%s", peer->name, peer->username, peer->remotesecret ? peer->remotesecret : peer->secret, peer->tohost, callback) < 0) {
+		if (asprintf(&reg_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 */




More information about the asterisk-commits mailing list