diff options
author | mvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-22 16:29:54 +0000 |
---|---|---|
committer | mvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-22 16:29:54 +0000 |
commit | c1210321e7aeb274076b14fc2f622edf442246fa (patch) | |
tree | bcbbf4eda53cdb8257bbc7add4616e01e31b1ae2 /apps/app_dial.c | |
parent | 2d9ba021dd38039616c82a4e317f652abe246ba3 (diff) |
- 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: http://svn.digium.com/svn/asterisk/trunk@117802 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r-- | apps/app_dial.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index d72a85411..105bce60d 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -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); } |