[Asterisk-cvs] asterisk/apps app_agi.c,1.33,1.34 app_disa.c,1.10,1.11 app_echo.c,1.8,1.9 app_festival.c,1.16,1.17 app_ices.c,1.2,1.3 app_intercom.c,1.15,1.16 app_meetme.c,1.21,1.22 app_milliwatt.c,1.6,1.7 app_mp3.c,1.14,1.15 app_nbscat.c,1.3,1.4 app_qcall.c,1.9,1.10 app_record.c,1.15,1.16 app_voicemail.c,1.73,1.74 app_zapbarge.c,1.2,1.3 app_zapscan.c,1.6,1.7

markster at lists.digium.com markster at lists.digium.com
Tue Apr 6 18:17:05 CDT 2004


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

Modified Files:
	app_agi.c app_disa.c app_echo.c app_festival.c app_ices.c 
	app_intercom.c app_meetme.c app_milliwatt.c app_mp3.c 
	app_nbscat.c app_qcall.c app_record.c app_voicemail.c 
	app_zapbarge.c app_zapscan.c 
Log Message:
Get rid of all that old needlock garbage now that we're using recursive mutexes


Index: app_agi.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_agi.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- app_agi.c	27 Mar 2004 06:50:12 -0000	1.33
+++ app_agi.c	6 Apr 2004 22:17:31 -0000	1.34
@@ -521,7 +521,7 @@
 
         if (silence > 0) {
         	rfmt = chan->readformat;
-                res = ast_set_read_format(chan, AST_FORMAT_SLINEAR, 1);
+                res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
                 if (res < 0) {
                 	ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
                         return -1;
@@ -633,7 +633,7 @@
 		fdprintf(agi->fd, "200 result=%d (randomerror) endpos=%ld\n", res, sample_offset);
 
         if (silence > 0) {
-                res = ast_set_read_format(chan, rfmt, 1);
+                res = ast_set_read_format(chan, rfmt);
                 if (res)
                         ast_log(LOG_WARNING, "Unable to restore read format on '%s'\n", chan->name);
                 ast_dsp_free(sildet);
@@ -1484,13 +1484,13 @@
 	int readformat;
 	int res;
 	readformat = chan->readformat;
-	if (ast_set_read_format(chan, AST_FORMAT_SLINEAR, 1)) {
+	if (ast_set_read_format(chan, AST_FORMAT_SLINEAR)) {
 		ast_log(LOG_WARNING, "Unable to set channel '%s' to linear mode\n", chan->name);
 		return -1;
 	}
 	res = agi_exec_full(chan, data, 1, 0);
 	if (!res) {
-		if (ast_set_read_format(chan, readformat, 1)) {
+		if (ast_set_read_format(chan, readformat)) {
 			ast_log(LOG_WARNING, "Unable to restore channel '%s' to format %s\n", chan->name, ast_getformatname(readformat));
 		}
 	}

Index: app_disa.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_disa.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- app_disa.c	27 Mar 2004 06:50:12 -0000	1.10
+++ app_disa.c	6 Apr 2004 22:17:31 -0000	1.11
@@ -129,12 +129,12 @@
 	FILE *fp;
 	char *stringp=NULL;
 
-	if (ast_set_write_format(chan,AST_FORMAT_ULAW, 1))
+	if (ast_set_write_format(chan,AST_FORMAT_ULAW))
 	{
 		ast_log(LOG_WARNING, "Unable to set write format to Mu-law on %s\n",chan->name);
 		return -1;
 	}
-	if (ast_set_read_format(chan,AST_FORMAT_ULAW, 1))
+	if (ast_set_read_format(chan,AST_FORMAT_ULAW))
 	{
 		ast_log(LOG_WARNING, "Unable to set read format to Mu-law on %s\n",chan->name);
 		return -1;

Index: app_echo.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_echo.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- app_echo.c	27 Mar 2004 06:50:12 -0000	1.8
+++ app_echo.c	6 Apr 2004 22:17:31 -0000	1.9
@@ -45,8 +45,8 @@
 	struct localuser *u;
 	struct ast_frame *f;
 	LOCAL_USER_ADD(u);
-	ast_set_write_format(chan, ast_best_codec(chan->nativeformats), 1);
-	ast_set_read_format(chan, ast_best_codec(chan->nativeformats), 1);
+	ast_set_write_format(chan, ast_best_codec(chan->nativeformats));
+	ast_set_read_format(chan, ast_best_codec(chan->nativeformats));
 	/* Do our thing here */
 	while(ast_waitfor(chan, -1) > -1) {
 		f = ast_read(chan);

Index: app_festival.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_festival.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- app_festival.c	27 Mar 2004 06:50:12 -0000	1.16
+++ app_festival.c	6 Apr 2004 22:17:31 -0000	1.17
@@ -158,7 +158,7 @@
 	ast_stopstream(chan);
 
 	owriteformat = chan->writeformat;
-	res = ast_set_write_format(chan, AST_FORMAT_SLINEAR, 1);
+	res = ast_set_write_format(chan, AST_FORMAT_SLINEAR);
 	if (res < 0) {
 		ast_log(LOG_WARNING, "Unable to set write format to signed linear\n");
 		return -1;
@@ -230,7 +230,7 @@
 //	if (pid > -1)
 //		kill(pid, SIGKILL);
 	if (!res && owriteformat)
-		ast_set_write_format(chan, owriteformat, 1);
+		ast_set_write_format(chan, owriteformat);
 	return res;
 }
 

Index: app_ices.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_ices.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- app_ices.c	27 Mar 2004 07:34:37 -0000	1.2
+++ app_ices.c	6 Apr 2004 22:17:31 -0000	1.3
@@ -113,7 +113,7 @@
 	}
 
 	oreadformat = chan->readformat;
-	res = ast_set_read_format(chan, AST_FORMAT_SLINEAR, 0);
+	res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
 	if (res < 0) {
 		close(fds[0]);
 		close(fds[1]);
@@ -164,7 +164,7 @@
 	if (pid > -1)
 		kill(pid, SIGKILL);
 	if (!res && oreadformat)
-		ast_set_read_format(chan, oreadformat, 0);
+		ast_set_read_format(chan, oreadformat);
 	return res;
 }
 

Index: app_intercom.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_intercom.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- app_intercom.c	27 Mar 2004 06:50:12 -0000	1.15
+++ app_intercom.c	6 Apr 2004 22:17:31 -0000	1.16
@@ -138,7 +138,7 @@
 	/* Remember original read format */
 	oreadformat = chan->readformat;
 	/* Set mode to signed linear */
-	res = ast_set_read_format(chan, AST_FORMAT_SLINEAR, 1);
+	res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
 	if (res < 0) {
 		ast_log(LOG_WARNING, "Unable to set format to signed linear on channel %s\n", chan->name);
 		return -1;
@@ -170,7 +170,7 @@
 	}
 	LOCAL_USER_REMOVE(u);
 	if (!res)
-		ast_set_read_format(chan, oreadformat, 1);
+		ast_set_read_format(chan, oreadformat);
 	return res;
 }
 

Index: app_meetme.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_meetme.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- app_meetme.c	27 Mar 2004 06:50:12 -0000	1.21
+++ app_meetme.c	6 Apr 2004 22:17:31 -0000	1.22
@@ -274,25 +274,25 @@
 
 	if (confflags & CONFFLAG_VIDEO) {	
 		/* Set it into linear mode (write) */
-		if (ast_set_write_format(chan, AST_FORMAT_SLINEAR, 1) < 0) {
+		if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
 			ast_log(LOG_WARNING, "Unable to set '%s' to write linear mode\n", chan->name);
 			goto outrun;
 		}
 
 		/* Set it into linear mode (read) */
-		if (ast_set_read_format(chan, AST_FORMAT_SLINEAR, 1) < 0) {
+		if (ast_set_read_format(chan, AST_FORMAT_SLINEAR) < 0) {
 			ast_log(LOG_WARNING, "Unable to set '%s' to read linear mode\n", chan->name);
 			goto outrun;
 		}
 	} else {
 		/* Set it into U-law mode (write) */
-		if (ast_set_write_format(chan, AST_FORMAT_ULAW, 1) < 0) {
+		if (ast_set_write_format(chan, AST_FORMAT_ULAW) < 0) {
 			ast_log(LOG_WARNING, "Unable to set '%s' to write ulaw mode\n", chan->name);
 			goto outrun;
 		}
 
 		/* Set it into U-law mode (read) */
-		if (ast_set_read_format(chan, AST_FORMAT_ULAW, 1) < 0) {
+		if (ast_set_read_format(chan, AST_FORMAT_ULAW) < 0) {
 			ast_log(LOG_WARNING, "Unable to set '%s' to read ulaw mode\n", chan->name);
 			goto outrun;
 		}

Index: app_milliwatt.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_milliwatt.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- app_milliwatt.c	27 Mar 2004 06:50:12 -0000	1.6
+++ app_milliwatt.c	6 Apr 2004 22:17:31 -0000	1.7
@@ -104,8 +104,8 @@
 
 	struct localuser *u;
 	LOCAL_USER_ADD(u);
-	ast_set_write_format(chan, AST_FORMAT_ULAW, 1);
-	ast_set_read_format(chan, AST_FORMAT_ULAW, 1);
+	ast_set_write_format(chan, AST_FORMAT_ULAW);
+	ast_set_read_format(chan, AST_FORMAT_ULAW);
 	if (chan->_state != AST_STATE_UP)
 	{
 		ast_answer(chan);

Index: app_mp3.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_mp3.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- app_mp3.c	29 Mar 2004 08:20:35 -0000	1.14
+++ app_mp3.c	6 Apr 2004 22:17:31 -0000	1.15
@@ -126,7 +126,7 @@
 	ast_stopstream(chan);
 
 	owriteformat = chan->writeformat;
-	res = ast_set_write_format(chan, AST_FORMAT_SLINEAR, 1);
+	res = ast_set_write_format(chan, AST_FORMAT_SLINEAR);
 	if (res < 0) {
 		ast_log(LOG_WARNING, "Unable to set write format to signed linear\n");
 		return -1;
@@ -192,7 +192,7 @@
 	if (pid > -1)
 		kill(pid, SIGKILL);
 	if (!res && owriteformat)
-		ast_set_write_format(chan, owriteformat, 1);
+		ast_set_write_format(chan, owriteformat);
 	return res;
 }
 

Index: app_nbscat.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_nbscat.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- app_nbscat.c	29 Mar 2004 08:20:35 -0000	1.3
+++ app_nbscat.c	6 Apr 2004 22:17:31 -0000	1.4
@@ -109,7 +109,7 @@
 	ast_stopstream(chan);
 
 	owriteformat = chan->writeformat;
-	res = ast_set_write_format(chan, AST_FORMAT_SLINEAR, 0);
+	res = ast_set_write_format(chan, AST_FORMAT_SLINEAR);
 	if (res < 0) {
 		ast_log(LOG_WARNING, "Unable to set write format to signed linear\n");
 		return -1;
@@ -175,7 +175,7 @@
 	if (pid > -1)
 		kill(pid, SIGKILL);
 	if (!res && owriteformat)
-		ast_set_write_format(chan, owriteformat, 0);
+		ast_set_write_format(chan, owriteformat);
 	return res;
 }
 

Index: app_qcall.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_qcall.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- app_qcall.c	27 Mar 2004 06:50:12 -0000	1.9
+++ app_qcall.c	6 Apr 2004 22:17:31 -0000	1.10
@@ -219,8 +219,8 @@
 	channel = ast_request(dialstr,AST_FORMAT_SLINEAR,tele);
 	if (channel)
 	   {
-		ast_set_read_format(channel,AST_FORMAT_SLINEAR, 1);
-		ast_set_write_format(channel,AST_FORMAT_SLINEAR, 1);
+		ast_set_read_format(channel,AST_FORMAT_SLINEAR);
+		ast_set_write_format(channel,AST_FORMAT_SLINEAR);
 #ifdef	OURCLID
 		if (channel->callerid)
 			free(channel->callerid);

Index: app_record.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_record.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- app_record.c	27 Mar 2004 06:50:12 -0000	1.15
+++ app_record.c	6 Apr 2004 22:17:31 -0000	1.16
@@ -141,7 +141,7 @@
 
 		if (silence > 0) {
 	        	rfmt = chan->readformat;
-        		res = ast_set_read_format(chan, AST_FORMAT_SLINEAR, 1);
+        		res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
         		if (res < 0) {
                 		ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
         		        return -1;
@@ -223,7 +223,7 @@
 
 	LOCAL_USER_REMOVE(u);
 	if (silence > 0) {
-	        res = ast_set_read_format(chan, rfmt, 1);
+	        res = ast_set_read_format(chan, rfmt);
         	if (res)
         	        ast_log(LOG_WARNING, "Unable to restore read format on '%s'\n", chan->name);
 		if (sildet)

Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- app_voicemail.c	6 Apr 2004 21:52:42 -0000	1.73
+++ app_voicemail.c	6 Apr 2004 22:17:31 -0000	1.74
@@ -1029,7 +1029,7 @@
 	
 	if (maxsilence > 0) {
 		rfmt = chan->readformat;
-		res = ast_set_read_format(chan, AST_FORMAT_SLINEAR, 1);
+		res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
 		if (res < 0) {
 			ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
 			return -1;
@@ -1162,7 +1162,7 @@
 		}
 	}
 	if (rfmt) {
-		if (ast_set_read_format(chan, rfmt, 1)) {
+		if (ast_set_read_format(chan, rfmt)) {
 			ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
 		}
 	}
@@ -1240,7 +1240,7 @@
 	
 	if (maxsilence > 0) {
 		rfmt = chan->readformat;
-		res = ast_set_read_format(chan, AST_FORMAT_SLINEAR, 1);
+		res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
 		if (res < 0) {
 			ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
 			return -1;
@@ -1345,7 +1345,7 @@
 		ast_closestream(others[x]);
 	}
 	if (rfmt) {
-		if (ast_set_read_format(chan, rfmt, 1)) {
+		if (ast_set_read_format(chan, rfmt)) {
 			ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
 		}
 	}

Index: app_zapbarge.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_zapbarge.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- app_zapbarge.c	27 Mar 2004 06:50:12 -0000	1.2
+++ app_zapbarge.c	6 Apr 2004 22:17:31 -0000	1.3
@@ -93,13 +93,13 @@
 	char *buf = __buf + AST_FRIENDLY_OFFSET;
 
 	/* Set it into U-law mode (write) */
-	if (ast_set_write_format(chan, AST_FORMAT_ULAW, 1) < 0) {
+	if (ast_set_write_format(chan, AST_FORMAT_ULAW) < 0) {
 		ast_log(LOG_WARNING, "Unable to set '%s' to write ulaw mode\n", chan->name);
 		goto outrun;
 	}
 
 	/* Set it into U-law mode (read) */
-	if (ast_set_read_format(chan, AST_FORMAT_ULAW, 1) < 0) {
+	if (ast_set_read_format(chan, AST_FORMAT_ULAW) < 0) {
 		ast_log(LOG_WARNING, "Unable to set '%s' to read ulaw mode\n", chan->name);
 		goto outrun;
 	}

Index: app_zapscan.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_zapscan.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- app_zapscan.c	27 Mar 2004 06:50:12 -0000	1.6
+++ app_zapscan.c	6 Apr 2004 22:17:31 -0000	1.7
@@ -93,13 +93,13 @@
         char *buf = __buf + AST_FRIENDLY_OFFSET;
 
         /* Set it into U-law mode (write) */
-        if (ast_set_write_format(chan, AST_FORMAT_ULAW, 1) < 0) {
+        if (ast_set_write_format(chan, AST_FORMAT_ULAW) < 0) {
                 ast_log(LOG_WARNING, "Unable to set '%s' to write ulaw mode\n", chan->name);
                 goto outrun;
         }
 
         /* Set it into U-law mode (read) */
-        if (ast_set_read_format(chan, AST_FORMAT_ULAW, 1) < 0) {
+        if (ast_set_read_format(chan, AST_FORMAT_ULAW) < 0) {
                 ast_log(LOG_WARNING, "Unable to set '%s' to read ulaw mode\n", chan->name);
                 goto outrun;
         }




More information about the svn-commits mailing list