projects
/
lcr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Since this banch only is for debugging the chan_lcr deadlock problem, i will commit...
[lcr.git]
/
chan_lcr.c
diff --git
a/chan_lcr.c
b/chan_lcr.c
index
5968733
..
88f6670
100644
(file)
--- a/
chan_lcr.c
+++ b/
chan_lcr.c
@@
-1687,16
+1687,21
@@
static void handle_queue()
struct ast_frame fr;
char *p;
struct ast_frame fr;
char *p;
+again:
call = call_first;
while(call) {
p = call->queue_string;
ast = call->ast;
if (*p && ast) {
lock_debug("A1+");
call = call_first;
while(call) {
p = call->queue_string;
ast = call->ast;
if (*p && ast) {
lock_debug("A1+");
-
while
(ast_channel_trylock(ast)) {
+
if
(ast_channel_trylock(ast)) {
lock_debug("<trylock failed>");
lock_debug("<trylock failed>");
+ ast_mutex_unlock(&chan_lock);
usleep(1000);
lock_debug("A1++");
usleep(1000);
lock_debug("A1++");
+ ast_mutex_lock(&chan_lock);
+ lock_debug("A1+-");
+ goto again;
}
lock_debug("A1-");
while(*p) {
}
lock_debug("A1-");
while(*p) {