[svn-commits] oej: branch group/set-tonezone-1.4 r297773 - in /team/group/set-tonezone-1.4:...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Dec 7 06:33:35 CST 2010


Author: oej
Date: Tue Dec  7 06:33:23 2010
New Revision: 297773

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=297773
Log:
Don't set empty zones

Modified:
    team/group/set-tonezone-1.4/channels/chan_sip.c
    team/group/set-tonezone-1.4/include/asterisk/indications.h

Modified: team/group/set-tonezone-1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/set-tonezone-1.4/channels/chan_sip.c?view=diff&rev=297773&r1=297772&r2=297773
==============================================================================
--- team/group/set-tonezone-1.4/channels/chan_sip.c (original)
+++ team/group/set-tonezone-1.4/channels/chan_sip.c Tue Dec  7 06:33:23 2010
@@ -4459,10 +4459,12 @@
 		tmp->amaflags = i->amaflags;
 	if (!ast_strlen_zero(i->language))
 		ast_string_field_set(tmp, language, i->language);
-	if (!(new_zone = ast_get_indication_zone(i->zone))) {
-		ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone. Check indications.conf for available country codes.\n", i->zone);
-	} else {
-		tmp->zone = new_zone;
+	if (!ast_strlen_zero(i->zone) {
+		if (!(new_zone = ast_get_indication_zone(i->zone))) {
+			ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone. Check indications.conf for available country codes.\n", i->zone);
+		} else {
+			tmp->zone = new_zone;
+		}
 	}
 	i->owner = tmp;
 	ast_module_ref(ast_module_info->self);

Modified: team/group/set-tonezone-1.4/include/asterisk/indications.h
URL: http://svnview.digium.com/svn/asterisk/team/group/set-tonezone-1.4/include/asterisk/indications.h?view=diff&rev=297773&r1=297772&r2=297773
==============================================================================
--- team/group/set-tonezone-1.4/include/asterisk/indications.h (original)
+++ team/group/set-tonezone-1.4/include/asterisk/indications.h Tue Dec  7 06:33:23 2010
@@ -34,7 +34,7 @@
 
 #include "asterisk/lock.h"
 
-#define MAX_TONEZONE_COUNTRY 5
+#define MAX_TONEZONE_COUNTRY 16
 
 struct tone_zone_sound {
 	struct tone_zone_sound *next;		/* next element */




More information about the svn-commits mailing list