aboutsummaryrefslogtreecommitdiffstats
path: root/manager.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-29 14:50:18 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-29 14:50:18 +0000
commit06fbbd19895c50b25faf8f6658fa8984525b86da (patch)
tree703113f22ff33a2561e7252a7def788ed5714c76 /manager.c
parent4e767760c884488e9bce7b17d2f833d10118923a (diff)
a bunch of conversion to ast_channel_*lock (issue #7058)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@23355 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'manager.c')
-rw-r--r--manager.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/manager.c b/manager.c
index 033320e87..06f996ab0 100644
--- a/manager.c
+++ b/manager.c
@@ -1053,7 +1053,7 @@ static int action_hangup(struct mansession *s, struct message *m)
return 0;
}
ast_softhangup(c, AST_SOFTHANGUP_EXPLICIT);
- ast_mutex_unlock(&c->lock);
+ ast_channel_unlock(c);
astman_send_ack(s, m, "Channel Hungup");
return 0;
}
@@ -1093,7 +1093,7 @@ static int action_setvar(struct mansession *s, struct message *m)
pbx_builtin_setvar_helper(c, varname, varval);
if (c)
- ast_mutex_unlock(&c->lock);
+ ast_channel_unlock(c);
astman_send_ack(s, m, "Variable Set");
@@ -1136,7 +1136,7 @@ static int action_getvar(struct mansession *s, struct message *m)
}
if (c)
- ast_mutex_unlock(&c->lock);
+ ast_channel_unlock(c);
astman_append(s, "Response: Success\r\n"
"Variable: %s\r\nValue: %s\r\n", varname, varval);
if (!ast_strlen_zero(id))
@@ -1227,7 +1227,7 @@ static int action_status(struct mansession *s, struct message *m)
c->accountcode,
ast_state2str(c->_state), bridge, c->uniqueid, idText);
}
- ast_mutex_unlock(&c->lock);
+ ast_channel_unlock(c);
if (!all)
break;
c = ast_channel_walk_locked(c);
@@ -1297,9 +1297,9 @@ static int action_redirect(struct mansession *s, struct message *m)
} else
astman_send_error(s, m, "Redirect failed");
if (chan)
- ast_mutex_unlock(&chan->lock);
+ ast_channel_unlock(chan);
if (chan2)
- ast_mutex_unlock(&chan2->lock);
+ ast_channel_unlock(chan2);
return 0;
}
@@ -1363,7 +1363,7 @@ static void *fast_originate(void *data)
/* Locked by ast_pbx_outgoing_exten or ast_pbx_outgoing_app */
if (chan)
- ast_mutex_unlock(&chan->lock);
+ ast_channel_unlock(chan);
free(in);
return NULL;
}
@@ -1626,7 +1626,7 @@ static int action_timeout(struct mansession *s, struct message *m)
return 0;
}
ast_channel_setwhentohangup(c, timeout);
- ast_mutex_unlock(&c->lock);
+ ast_channel_unlock(c);
astman_send_ack(s, m, "Timeout Set");
return 0;
}