[asterisk-commits] pabelanger: branch 1.6.0 r261326 - in /branches/1.6.0: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 5 14:19:18 CDT 2010


Author: pabelanger
Date: Wed May  5 14:19:13 2010
New Revision: 261326

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=261326
Log:
Merged revisions 261314 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r261314 | pabelanger | 2010-05-05 14:43:03 -0400 (Wed, 05 May 2010) | 19 lines
  
  Merged revisions 261274 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r261274 | pabelanger | 2010-05-05 12:42:22 -0400 (Wed, 05 May 2010) | 12 lines
    
    Registration fix for SIP realtime.
    
    Make sure realtime fields are not empty.
    
    (closes issue #17266)
    Reported by: Nick_Lewis
    Patches:
          chan_sip.c-realtime.patch uploaded by Nick Lewis (license 657)
    Tested by: Nick_Lewis, sberney
    
    Review: https://reviewboard.asterisk.org/r/643/
  ........
................

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

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

Modified: branches/1.6.0/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/channels/chan_sip.c?view=diff&rev=261326&r1=261325&r2=261326
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Wed May  5 14:19:13 2010
@@ -21982,19 +21982,23 @@
 					}
 				}
 			} else if (!strcasecmp(v->name, "defaultip")) {
-				if (ast_get_ip(&peer->defaddr, v->value)) {
+				if (!ast_strlen_zero(v->value) && ast_get_ip(&peer->defaddr, v->value)) {
 					unref_peer(peer);
 					return NULL;
 				}
 			} else if (!strcasecmp(v->name, "permit") || !strcasecmp(v->name, "deny")) {
 				int ha_error = 0;
-				peer->ha = ast_append_ha(v->name, v->value, peer->ha, &ha_error);
+				if (!ast_strlen_zero(v->value)) {
+					peer->ha = ast_append_ha(v->name, v->value, peer->ha, &ha_error);
+				}
 				if (ha_error) {
 					ast_log(LOG_ERROR, "Bad ACL entry in configuration line %d : %s\n", v->lineno, v->value);
 				}
 			} else if (!strcasecmp(v->name, "contactpermit") || !strcasecmp(v->name, "contactdeny")) {
 				int ha_error = 0;
-				peer->contactha = ast_append_ha(v->name + 7, v->value, peer->contactha, &ha_error);
+				if (!ast_strlen_zero(v->value)) {
+					peer->contactha = ast_append_ha(v->name + 7, v->value, peer->contactha, &ha_error);
+				}
 				if (ha_error) {
 					ast_log(LOG_ERROR, "Bad ACL entry in configuration line %d : %s\n", v->lineno, v->value);
 				}




More information about the asterisk-commits mailing list