Get rid of all that old needlock garbage now that we're using recursive mutexes

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-04-06 22:17:32 +00:00
parent d0037ea2fd
commit 13bca43aa8
40 changed files with 226 additions and 263 deletions

View File

@@ -367,15 +367,15 @@ int adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msgl
ast_stopstream(chan);
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 ULAW\n");
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 ULAW\n");
if (writeformat) {
if (ast_set_write_format(chan, writeformat, 1))
if (ast_set_write_format(chan, writeformat))
ast_log(LOG_WARNING, "Unable to restore write format to %d\n", writeformat);
}
return -1;
@@ -385,9 +385,9 @@ int adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msgl
chan->adsicpe = (chan->adsicpe & ~ADSI_FLAG_DATAMODE) | newdatamode;
if (writeformat)
ast_set_write_format(chan, writeformat, 1);
ast_set_write_format(chan, writeformat);
if (readformat)
ast_set_read_format(chan, readformat, 1);
ast_set_read_format(chan, readformat);
return res;
}

View File

@@ -397,7 +397,7 @@ static void moh_release(struct ast_channel *chan, void *data)
oldwfmt = moh->origwfmt;
free(moh);
if (chan) {
if (oldwfmt && ast_set_write_format(chan, oldwfmt, 0))
if (oldwfmt && ast_set_write_format(chan, oldwfmt))
ast_log(LOG_WARNING, "Unable to restore channel '%s' to format %s\n", chan->name, ast_getformatname(oldwfmt));
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Stopped music on hold on %s\n", chan->name);
@@ -420,7 +420,7 @@ static void *moh_alloc(struct ast_channel *chan, void *params)
ast_mutex_unlock(&moh_lock);
if (res) {
res->origwfmt = chan->writeformat;
if (ast_set_write_format(chan, AST_FORMAT_SLINEAR, 1)) {
if (ast_set_write_format(chan, AST_FORMAT_SLINEAR)) {
ast_log(LOG_WARNING, "Unable to set '%s' to signed linear format\n", chan->name);
moh_release(NULL, res);
res = NULL;

View File

@@ -378,7 +378,7 @@ int ast_bridge_call(struct ast_channel *chan, struct ast_channel *peer, int allo
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Transferring %s to '%s' (context %s) priority 1\n"
,transferee->name, newext, transferer_real_context);
if (ast_async_goto(transferee, transferer_real_context, newext, 1, 1))
if (ast_async_goto(transferee, transferer_real_context, newext, 1))
ast_log(LOG_WARNING, "Async goto fialed :(\n");
res = -1;
} else {
@@ -736,7 +736,7 @@ int ast_pickup_call(struct ast_channel *chan)
res = ast_answer(chan);
if (res)
ast_log(LOG_WARNING, "Unable to answer '%s'\n", chan->name);
res = ast_queue_control(chan, AST_CONTROL_ANSWER, 0);
res = ast_queue_control(chan, AST_CONTROL_ANSWER);
if (res)
ast_log(LOG_WARNING, "Unable to queue answer on '%s'\n", chan->name);
res = ast_channel_masquerade(cur, chan);