mirror of
https://github.com/asterisk/asterisk.git
synced 2026-05-05 21:04:01 +00:00
- revert change to ast_queue_hangup and create ast_queue_hangup_with_cause
- make data member of the ast_frame struct a named union instead of a void Recently the ast_queue_hangup function got a new parameter, the hangupcause Feedback came in that this is no good and that instead a new function should be created. This I did. The hangupcause was stored in the seqno member of the ast_frame struct. This is not very elegant, and since there's already a data member that one should be used. Problem is, this member was a void *. Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone wants to store another type in there in the future. This commit is so massive, because all ast_frame.data uses have to be altered to ast_frame.data.data Thanks russellb and kpfleming for the feedback. (closes issue #12674) Reported by: mvanbaak git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -765,7 +765,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
|
||||
}
|
||||
break;
|
||||
case AST_FRAME_HTML:
|
||||
if (!ast_test_flag64(outgoing, DIAL_NOFORWARDHTML) && ast_channel_sendhtml(in, f->subclass, f->data, f->datalen) == -1) {
|
||||
if (!ast_test_flag64(outgoing, DIAL_NOFORWARDHTML) && ast_channel_sendhtml(in, f->subclass, f->data.ptr, f->datalen) == -1) {
|
||||
ast_log(LOG_WARNING, "Unable to send URL\n");
|
||||
}
|
||||
break;
|
||||
@@ -789,8 +789,9 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
|
||||
strcpy(pa->status, "CANCEL");
|
||||
ast_cdr_noanswer(in->cdr);
|
||||
if (f) {
|
||||
if (f->seqno)
|
||||
in->hangupcause = f->seqno;
|
||||
if (f->data.uint32) {
|
||||
in->hangupcause = f->data.uint32;
|
||||
}
|
||||
ast_frfree(f);
|
||||
}
|
||||
return NULL;
|
||||
@@ -824,7 +825,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
|
||||
|
||||
/* Forward HTML stuff */
|
||||
if (single && (f->frametype == AST_FRAME_HTML) && !ast_test_flag64(outgoing, DIAL_NOFORWARDHTML))
|
||||
if (ast_channel_sendhtml(outgoing->chan, f->subclass, f->data, f->datalen) == -1)
|
||||
if (ast_channel_sendhtml(outgoing->chan, f->subclass, f->data.ptr, f->datalen) == -1)
|
||||
ast_log(LOG_WARNING, "Unable to send URL\n");
|
||||
|
||||
if (single && ((f->frametype == AST_FRAME_VOICE) || (f->frametype == AST_FRAME_DTMF_BEGIN) || (f->frametype == AST_FRAME_DTMF_END))) {
|
||||
@@ -837,7 +838,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
|
||||
(f->subclass == AST_CONTROL_VIDUPDATE) ||
|
||||
(f->subclass == AST_CONTROL_SRCUPDATE))) {
|
||||
ast_verb(3, "%s requested special control %d, passing it to %s\n", in->name, f->subclass, outgoing->chan->name);
|
||||
ast_indicate_data(outgoing->chan, f->subclass, f->data, f->datalen);
|
||||
ast_indicate_data(outgoing->chan, f->subclass, f->data.ptr, f->datalen);
|
||||
}
|
||||
ast_frfree(f);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user