[Asterisk-Dev] chan_ringing bug ?
artemisio.palagotti
artemisio.palagotti at libero.it
Wed Dec 22 08:57:18 MST 2004
Hi all,
I think I've found a bug in chan_ringing function in chan_h323.c file. The function check if p pointer is void but it doesn't return if p==NULL:
void chan_ringing(unsigned call_reference, const char *token)
{
struct ast_channel *c = NULL;
struct oh323_pvt *p = NULL;
p = find_call(call_reference, token);
if (!p) {
ast_log(LOG_ERROR, "Something is wrong: ringing\n");
}
if (!p->owner) {
ast_log(LOG_ERROR, "Channel has no owner\n");
return;
}
c = p->owner;
ast_setstate(c, AST_STATE_RINGING);
ast_queue_control(c, AST_CONTROL_RINGING);
return;
}
if p is null p->owner drive asterisk to dead. I think the function shuld be:
void chan_ringing(unsigned call_reference, const char *token)
{
struct ast_channel *c = NULL;
struct oh323_pvt *p = NULL;
p = find_call(call_reference, token);
if (!p) {
ast_log(LOG_ERROR, "Something is wrong: ringing\n");
return;
}
if (!p->owner) {
ast_log(LOG_ERROR, "Channel has no owner\n");
return;
}
c = p->owner;
ast_setstate(c, AST_STATE_RINGING);
ast_queue_control(c, AST_CONTROL_RINGING);
return;
}
I've found this when trying to trasfer a H.323 call to a SIP phone with H.450. This capability seems doesn't work, but the worse things is asterisk crashes because p==NULL in chan_ringing.
Then, why H.450 transfer doesn't work ? Has anyone any idea ?
Regards,
Arty.
____________________________________________________________
Regala e regalati Libero ADSL: 3 mesi gratis e navighi veloce. 1.2 Mega di musica, film, video e sport.
Abbonati subito senza costi di attivazione su http://www.libero.it
More information about the asterisk-dev
mailing list