[Asterisk-cvs] asterisk/res res_indications.c,1.17,1.17.2.1

russell russell
Wed Nov 23 01:00:33 CST 2005


Update of /usr/cvsroot/asterisk/res
In directory mongoose.digium.com:/tmp/cvs-serv5831/res

Modified Files:
      Tag: v1-2
	res_indications.c 
Log Message:
issue #5826


Index: res_indications.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_indications.c,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -u -d -r1.17 -r1.17.2.1
--- res_indications.c	8 Nov 2005 04:48:00 -0000	1.17
+++ res_indications.c	23 Nov 2005 05:49:35 -0000	1.17.2.1
@@ -182,11 +182,11 @@
 					ast_cli(fd,"Country Indication      PlayList\n"
 						   "=====================================\n");
 				}
-				j = snprintf(buf,sizeof(buf),"%-7.7s %-15.15s ",tz->country,"<ringcadance>");
-				for (i=0; i<tz->nrringcadance; i++) {
-					j += snprintf(buf+j,sizeof(buf)-j,"%d,",tz->ringcadance[i]);
+				j = snprintf(buf,sizeof(buf),"%-7.7s %-15.15s ",tz->country,"<ringcadence>");
+				for (i=0; i<tz->nrringcadence; i++) {
+					j += snprintf(buf+j,sizeof(buf)-j,"%d,",tz->ringcadence[i]);
 				}
-				if (tz->nrringcadance) j--;
+				if (tz->nrringcadence) j--;
 				ast_copy_string(buf+j,"\n",sizeof(buf)-j);
 				ast_cli(fd,buf);
 				for (ts=tz->tones; ts; ts=ts->next)
@@ -271,26 +271,26 @@
 		while(v) {
 			if (!strcasecmp(v->name, "description")) {
 				ast_copy_string(tones->description, v->value, sizeof(tones->description));
-			} else if (!strcasecmp(v->name,"ringcadance")) {
+			} else if ((!strcasecmp(v->name,"ringcadence"))||(!strcasecmp(v->name,"ringcadance"))) {
 				char *ring,*rings = ast_strdupa(v->value);
 				c = rings;
 				ring = strsep(&c,",");
 				while (ring) {
 					int *tmp, val;
 					if (!isdigit(ring[0]) || (val=atoi(ring))==-1) {
-						ast_log(LOG_WARNING,"Invalid ringcadance given '%s' at line %d.\n",ring,v->lineno);
+						ast_log(LOG_WARNING,"Invalid ringcadence given '%s' at line %d.\n",ring,v->lineno);
 						ring = strsep(&c,",");
 						continue;
 					}
-					tmp = realloc(tones->ringcadance,(tones->nrringcadance+1)*sizeof(int));
+					tmp = realloc(tones->ringcadence,(tones->nrringcadence+1)*sizeof(int));
 					if (!tmp) {
 						ast_log(LOG_WARNING, "Out of memory\n");
 						ast_config_destroy(cfg);
 						return -1;
 					}
-					tones->ringcadance = tmp;
-					tmp[tones->nrringcadance] = val;
-					tones->nrringcadance++;
+					tones->ringcadence = tmp;
+					tmp[tones->nrringcadence] = val;
+					tones->nrringcadence++;
 					/* next item */
 					ring = strsep(&c,",");
 				}




More information about the svn-commits mailing list