mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user