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 /channels/chan_unistim.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 'channels/chan_unistim.c')
-rw-r--r-- | channels/chan_unistim.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c index 3eda9334a..f806c1077 100644 --- a/channels/chan_unistim.c +++ b/channels/chan_unistim.c @@ -1125,7 +1125,7 @@ static void close_client(struct unistimsession *s) if (sub->owner) { /* Call in progress ? */ if (unistimdebug) ast_verb(0, "Aborting call\n"); - ast_queue_hangup(sub->owner, AST_CAUSE_NETWORK_OUT_OF_ORDER); + ast_queue_hangup_with_cause(sub->owner, AST_CAUSE_NETWORK_OUT_OF_ORDER); } } else ast_log(LOG_WARNING, "Freeing a client with no subchannel !\n"); @@ -1974,11 +1974,11 @@ static void close_call(struct unistimsession *pte) if (attempt_transfer(sub, l->subs[SUB_THREEWAY]) < 0) ast_verb(0, "attempt_transfer failed.\n"); } else - ast_queue_hangup(sub->owner, -1); + ast_queue_hangup(sub->owner); } else { if (l->subs[SUB_THREEWAY]) { if (l->subs[SUB_THREEWAY]->owner) - ast_queue_hangup(l->subs[SUB_THREEWAY]->owner, AST_CAUSE_NORMAL_CLEARING); + ast_queue_hangup_with_cause(l->subs[SUB_THREEWAY]->owner, AST_CAUSE_NORMAL_CLEARING); else ast_log(LOG_WARNING, "threeway sub without owner\n"); } else @@ -2312,7 +2312,7 @@ static void TransferCallStep1(struct unistimsession *pte) if (unistimdebug) ast_verb(0, "Transfer canceled, hangup our threeway channel\n"); if (p->subs[SUB_THREEWAY]->owner) - ast_queue_hangup(p->subs[SUB_THREEWAY]->owner, AST_CAUSE_NORMAL_CLEARING); + ast_queue_hangup_with_cause(p->subs[SUB_THREEWAY]->owner, AST_CAUSE_NORMAL_CLEARING); else ast_log(LOG_WARNING, "Canceling a threeway channel without owner\n"); return; @@ -2368,7 +2368,7 @@ static void HandleCallOutgoing(struct unistimsession *s) /* start switch */ if (ast_pthread_create(&t, NULL, unistim_ss, c)) { display_last_error("Unable to create switch thread"); - ast_queue_hangup(c, AST_CAUSE_SWITCH_CONGESTION); + ast_queue_hangup_with_cause(c, AST_CAUSE_SWITCH_CONGESTION); } } else ast_log(LOG_WARNING, "Unable to create channel for %s@%s\n", |