diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index 1a520f4db507f958308af9d0bc3969de0c19ad4b..2df7c2299a7754a83727193887f40d89c0aa6bd2 100644 --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -1236,17 +1236,18 @@ static int ooh323_indicate(struct ast_channel *ast, int condition, const void *d } break; case AST_CONTROL_RINGING: - if (ast->_state == AST_STATE_RING || ast->_state == AST_STATE_RINGING) { - if (!p->alertsent) { - if (gH323Debug) { - ast_debug(1, "Sending manual ringback for %s, res = %d\n", - callToken, - ooManualRingback(callToken)); - } else { - ooManualRingback(callToken); + if (ast->_state == AST_STATE_RING || ast->_state == AST_STATE_RINGING) { + if (!p->alertsent) { + if (gH323Debug) { + ast_debug(1, "Sending manual ringback for %s, res = %d\n", + callToken, + ooManualRingback(callToken)); + } else { + ooManualRingback(callToken); + } + p->alertsent = 1; } - p->alertsent = 1; - } + } break; case AST_CONTROL_SRCUPDATE: ast_rtp_instance_update_source(p->rtp); @@ -4095,7 +4096,7 @@ static int ooh323_set_udptl_peer(struct ast_channel *chan, struct ast_udptl *udp memset(&p->udptlredirip, 0, sizeof(p->udptlredirip)); ast_mutex_unlock(&p->lock); - free(callToken); + /* free(callToken); */ return 0; } diff --git a/addons/ooh323c/src/ooCmdChannel.c b/addons/ooh323c/src/ooCmdChannel.c index ff3988273788aec6b95c13f68d1fb30194d28563..31a74169c0b263438ee3a4197033e530335abfd6 100644 --- a/addons/ooh323c/src/ooCmdChannel.c +++ b/addons/ooh323c/src/ooCmdChannel.c @@ -56,7 +56,7 @@ int ooCreateCallCmdConnection(OOH323CallData* call) OOTRACEINFO2("INFO: create cmd connect for call: %lx\n", call); - call->CmdChanLock = ast_calloc(1, sizeof(ast_mutex_t)); + call->CmdChanLock = calloc(1, sizeof(ast_mutex_t)); ast_mutex_init(call->CmdChanLock);