Another test patch.
[lcr.git] / chan_lcr.c
index 53c814f..b710888 100644 (file)
@@ -623,7 +623,7 @@ static void send_setup_to_lcr(struct chan_call *call)
 {
        union parameter newparam;
        struct ast_channel *ast = call->ast;
-       const char *tmp;
+//     const char *tmp;
 
        if (!call->ast || !call->ref)
                return;
@@ -676,9 +676,10 @@ static void send_setup_to_lcr(struct chan_call *call)
                default:
                newparam.setup.callerinfo.ntype = INFO_NTYPE_UNKNOWN;
        }
-       tmp = pbx_builtin_getvar_helper(ast, "LCR_TRANSFERCAPABILITY");
-       if (tmp && *tmp)
-               ast->transfercapability = atoi(tmp);
+#warning DISABLED DUE TO DOUBLE LOCKING PROBLEM
+//     tmp = pbx_builtin_getvar_helper(ast, "LCR_TRANSFERCAPABILITY");
+//     if (tmp && *tmp)
+//             ast->transfercapability = atoi(tmp);
        newparam.setup.capainfo.bearer_capa = ast->transfercapability;
        newparam.setup.capainfo.bearer_mode = INFO_BMODE_CIRCUIT;
        if (call->hdlc)
@@ -1696,10 +1697,10 @@ again:
                        lock_debug("A1+");
                        if (ast_channel_trylock(ast)) {
                                lock_debug("<trylock failed>");
-                               ast_mutex_unlock(&log_lock);
+                               ast_mutex_unlock(&chan_lock);
                                usleep(1000);
                                lock_debug("A1++");
-                               ast_mutex_lock(&log_lock);
+                               ast_mutex_lock(&chan_lock);
                                lock_debug("A1+-");
                                goto again;
                        }