diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-06 22:17:32 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-06 22:17:32 +0000 |
commit | b837107b6b89ed55e1ac5e2ef829e72275914403 (patch) | |
tree | f9360f7b870da96fcd47e19ff8c203287e906599 /apps | |
parent | 72df970e585d58cc41da5f90b28ce4676217ef0a (diff) |
Get rid of all that old needlock garbage now that we're using recursive mutexes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2644 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_agi.c | 8 | ||||
-rwxr-xr-x | apps/app_disa.c | 4 | ||||
-rwxr-xr-x | apps/app_echo.c | 4 | ||||
-rwxr-xr-x | apps/app_festival.c | 4 | ||||
-rwxr-xr-x | apps/app_ices.c | 4 | ||||
-rwxr-xr-x | apps/app_intercom.c | 4 | ||||
-rwxr-xr-x | apps/app_meetme.c | 8 | ||||
-rwxr-xr-x | apps/app_milliwatt.c | 4 | ||||
-rwxr-xr-x | apps/app_mp3.c | 4 | ||||
-rwxr-xr-x | apps/app_nbscat.c | 4 | ||||
-rwxr-xr-x | apps/app_qcall.c | 4 | ||||
-rwxr-xr-x | apps/app_record.c | 4 | ||||
-rwxr-xr-x | apps/app_voicemail.c | 8 | ||||
-rwxr-xr-x | apps/app_zapbarge.c | 4 | ||||
-rwxr-xr-x | apps/app_zapscan.c | 4 |
15 files changed, 36 insertions, 36 deletions
diff --git a/apps/app_agi.c b/apps/app_agi.c index e2cdd0ebc..529fbe2e1 100755 --- a/apps/app_agi.c +++ b/apps/app_agi.c @@ -521,7 +521,7 @@ static int handle_recordfile(struct ast_channel *chan, AGI *agi, int argc, char 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 @@ static int handle_recordfile(struct ast_channel *chan, AGI *agi, int argc, char 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 @@ static int eagi_exec(struct ast_channel *chan, void *data) 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)); } } diff --git a/apps/app_disa.c b/apps/app_disa.c index a518cb7e1..26676d4bb 100755 --- a/apps/app_disa.c +++ b/apps/app_disa.c @@ -129,12 +129,12 @@ static int disa_exec(struct ast_channel *chan, void *data) 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; diff --git a/apps/app_echo.c b/apps/app_echo.c index 7de30008b..42355a2ff 100755 --- a/apps/app_echo.c +++ b/apps/app_echo.c @@ -45,8 +45,8 @@ static int echo_exec(struct ast_channel *chan, void *data) 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); diff --git a/apps/app_festival.c b/apps/app_festival.c index 702fdd8e6..337de43b6 100755 --- a/apps/app_festival.c +++ b/apps/app_festival.c @@ -158,7 +158,7 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in 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 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in // if (pid > -1) // kill(pid, SIGKILL); if (!res && owriteformat) - ast_set_write_format(chan, owriteformat, 1); + ast_set_write_format(chan, owriteformat); return res; } diff --git a/apps/app_ices.c b/apps/app_ices.c index 27abab808..294ecc604 100755 --- a/apps/app_ices.c +++ b/apps/app_ices.c @@ -113,7 +113,7 @@ static int ices_exec(struct ast_channel *chan, void *data) } 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 @@ static int ices_exec(struct ast_channel *chan, void *data) if (pid > -1) kill(pid, SIGKILL); if (!res && oreadformat) - ast_set_read_format(chan, oreadformat, 0); + ast_set_read_format(chan, oreadformat); return res; } diff --git a/apps/app_intercom.c b/apps/app_intercom.c index 96219deec..925ea37c2 100755 --- a/apps/app_intercom.c +++ b/apps/app_intercom.c @@ -138,7 +138,7 @@ static int intercom_exec(struct ast_channel *chan, void *data) /* 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 @@ static int intercom_exec(struct ast_channel *chan, void *data) } LOCAL_USER_REMOVE(u); if (!res) - ast_set_read_format(chan, oreadformat, 1); + ast_set_read_format(chan, oreadformat); return res; } diff --git a/apps/app_meetme.c b/apps/app_meetme.c index ad58809b3..b7d488ad0 100755 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -274,25 +274,25 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c 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; } diff --git a/apps/app_milliwatt.c b/apps/app_milliwatt.c index 03c2050a7..78f0604ce 100755 --- a/apps/app_milliwatt.c +++ b/apps/app_milliwatt.c @@ -104,8 +104,8 @@ static int milliwatt_exec(struct ast_channel *chan, void *data) 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); diff --git a/apps/app_mp3.c b/apps/app_mp3.c index 2ada2ab9d..aee04795f 100755 --- a/apps/app_mp3.c +++ b/apps/app_mp3.c @@ -126,7 +126,7 @@ static int mp3_exec(struct ast_channel *chan, void *data) 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 @@ static int mp3_exec(struct ast_channel *chan, void *data) if (pid > -1) kill(pid, SIGKILL); if (!res && owriteformat) - ast_set_write_format(chan, owriteformat, 1); + ast_set_write_format(chan, owriteformat); return res; } diff --git a/apps/app_nbscat.c b/apps/app_nbscat.c index 3499f5500..ed5116d7e 100755 --- a/apps/app_nbscat.c +++ b/apps/app_nbscat.c @@ -109,7 +109,7 @@ static int NBScat_exec(struct ast_channel *chan, void *data) 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 @@ static int NBScat_exec(struct ast_channel *chan, void *data) if (pid > -1) kill(pid, SIGKILL); if (!res && owriteformat) - ast_set_write_format(chan, owriteformat, 0); + ast_set_write_format(chan, owriteformat); return res; } diff --git a/apps/app_qcall.c b/apps/app_qcall.c index 879b1c8ad..e876f0ae3 100755 --- a/apps/app_qcall.c +++ b/apps/app_qcall.c @@ -219,8 +219,8 @@ time_t t; 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); diff --git a/apps/app_record.c b/apps/app_record.c index 81a7704e8..80dd1da89 100755 --- a/apps/app_record.c +++ b/apps/app_record.c @@ -141,7 +141,7 @@ static int record_exec(struct ast_channel *chan, void *data) 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 @@ static int record_exec(struct ast_channel *chan, void *data) 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) diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 252fdb26e..d0ba1d5a1 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1029,7 +1029,7 @@ static int play_and_prepend(struct ast_channel *chan, char *playfile, char *reco 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 @@ static int play_and_prepend(struct ast_channel *chan, char *playfile, char *reco } } 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 @@ static int play_and_record(struct ast_channel *chan, char *playfile, char *recor 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 @@ static int play_and_record(struct ast_channel *chan, char *playfile, char *recor 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); } } diff --git a/apps/app_zapbarge.c b/apps/app_zapbarge.c index 1c03afc0b..0b865df5b 100755 --- a/apps/app_zapbarge.c +++ b/apps/app_zapbarge.c @@ -93,13 +93,13 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags) 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; } diff --git a/apps/app_zapscan.c b/apps/app_zapscan.c index ef7ac4215..b24fe5d57 100755 --- a/apps/app_zapscan.c +++ b/apps/app_zapscan.c @@ -93,13 +93,13 @@ static int conf_run(struct ast_channel *chan, int confno, int confflags) 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; } |