[svn-commits] mvanbaak: branch mvanbaak/ast_frame_dataunion r117214 - in /team/mvanbaak/ast...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon May 19 16:03:39 CDT 2008
Author: mvanbaak
Date: Mon May 19 16:03:38 2008
New Revision: 117214
URL: http://svn.digium.com/view/asterisk?view=rev&rev=117214
Log:
replace all data_int occurences with data.uint32
Modified:
team/mvanbaak/ast_frame_dataunion/apps/app_alarmreceiver.c
team/mvanbaak/ast_frame_dataunion/apps/app_dial.c
team/mvanbaak/ast_frame_dataunion/apps/app_disa.c
team/mvanbaak/ast_frame_dataunion/apps/app_externalivr.c
team/mvanbaak/ast_frame_dataunion/apps/app_followme.c
team/mvanbaak/ast_frame_dataunion/apps/app_queue.c
team/mvanbaak/ast_frame_dataunion/channels/chan_iax2.c
team/mvanbaak/ast_frame_dataunion/channels/chan_local.c
team/mvanbaak/ast_frame_dataunion/main/channel.c
Modified: team/mvanbaak/ast_frame_dataunion/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/apps/app_alarmreceiver.c?view=diff&rev=117214&r1=117213&r2=117214
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/apps/app_alarmreceiver.c (original)
+++ team/mvanbaak/ast_frame_dataunion/apps/app_alarmreceiver.c Mon May 19 16:03:38 2008
@@ -252,8 +252,8 @@
/* If they hung up, leave */
if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP)) {
- if (f->data_int) {
- chan->hangupcause = f->data_int;
+ if (f->data.uint32) {
+ chan->hangupcause = f->data.uint32;
}
ast_frfree(f);
res = -1;
Modified: team/mvanbaak/ast_frame_dataunion/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/apps/app_dial.c?view=diff&rev=117214&r1=117213&r2=117214
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/apps/app_dial.c (original)
+++ team/mvanbaak/ast_frame_dataunion/apps/app_dial.c Mon May 19 16:03:38 2008
@@ -789,8 +789,8 @@
strcpy(pa->status, "CANCEL");
ast_cdr_noanswer(in->cdr);
if (f) {
- if (f->data_int) {
- in->hangupcause = f->data_int;
+ if (f->data.uint32) {
+ in->hangupcause = f->data.uint32;
}
ast_frfree(f);
}
Modified: team/mvanbaak/ast_frame_dataunion/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/apps/app_disa.c?view=diff&rev=117214&r1=117213&r2=117214
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/apps/app_disa.c (original)
+++ team/mvanbaak/ast_frame_dataunion/apps/app_disa.c Mon May 19 16:03:38 2008
@@ -195,8 +195,8 @@
}
if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP)) {
- if (f->data_int)
- chan->hangupcause = f->data_int;
+ if (f->data.uint32)
+ chan->hangupcause = f->data.uint32;
ast_frfree(f);
ast_clear_flag(chan, AST_FLAG_END_DTMF_ONLY);
return -1;
Modified: team/mvanbaak/ast_frame_dataunion/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/apps/app_externalivr.c?view=diff&rev=117214&r1=117213&r2=117214
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/apps/app_externalivr.c (original)
+++ team/mvanbaak/ast_frame_dataunion/apps/app_externalivr.c Mon May 19 16:03:38 2008
@@ -566,8 +566,8 @@
} else if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP)) {
ast_chan_log(LOG_NOTICE, chan, "Got AST_CONTROL_HANGUP\n");
send_eivr_event(eivr_events, 'H', NULL, chan);
- if (f->data_int) {
- chan->hangupcause = f->data_int;
+ if (f->data.uint32) {
+ chan->hangupcause = f->data.uint32;
}
ast_frfree(f);
res = -1;
Modified: team/mvanbaak/ast_frame_dataunion/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/apps/app_followme.c?view=diff&rev=117214&r1=117213&r2=117214
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/apps/app_followme.c (original)
+++ team/mvanbaak/ast_frame_dataunion/apps/app_followme.c Mon May 19 16:03:38 2008
@@ -607,8 +607,8 @@
switch(f->subclass) {
case AST_CONTROL_HANGUP:
ast_verb(3, "%s received a hangup frame.\n", winner->name);
- if (f->data_int) {
- winner->hangupcause = f->data_int;
+ if (f->data.uint32) {
+ winner->hangupcause = f->data.uint32;
}
if (dg == 0) {
ast_verb(3, "The calling channel hungup. Need to drop everyone else.\n");
Modified: team/mvanbaak/ast_frame_dataunion/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/apps/app_queue.c?view=diff&rev=117214&r1=117213&r2=117214
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/apps/app_queue.c (original)
+++ team/mvanbaak/ast_frame_dataunion/apps/app_queue.c Mon May 19 16:03:38 2008
@@ -2648,8 +2648,8 @@
/* Got hung up */
*to = -1;
if (f) {
- if (f->data_int) {
- in->hangupcause = f->data_int;
+ if (f->data.uint32) {
+ in->hangupcause = f->data.uint32;
}
ast_frfree(f);
}
Modified: team/mvanbaak/ast_frame_dataunion/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/channels/chan_iax2.c?view=diff&rev=117214&r1=117213&r2=117214
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/channels/chan_iax2.c (original)
+++ team/mvanbaak/ast_frame_dataunion/channels/chan_iax2.c Mon May 19 16:03:38 2008
@@ -2312,10 +2312,7 @@
ast_log(LOG_WARNING, "Max retries exceeded to host %s on %s (type = %d, subclass = %d, ts=%d, seqno=%d)\n", ast_inet_ntoa(iaxs[f->callno]->addr.sin_addr),iaxs[f->callno]->owner->name , f->af.frametype, f->af.subclass, f->ts, f->oseqno);
iaxs[callno]->error = ETIMEDOUT;
if (iaxs[callno]->owner) {
- struct ast_frame fr = { AST_FRAME_CONTROL, AST_CONTROL_HANGUP };
- // because data/data_int is an anonymous member, we cannot set it at declaration
- // that's why we initialize it after declaring fr
- fr.data_int = AST_CAUSE_DESTINATION_OUT_OF_ORDER;
+ struct ast_frame fr = { AST_FRAME_CONTROL, AST_CONTROL_HANGUP, .data.uint32 = AST_CAUSE_DESTINATION_OUT_OF_ORDER };
/* Hangup the fd */
iax2_queue_frame(callno, &fr); /* XXX */
/* Remember, owner could disappear */
Modified: team/mvanbaak/ast_frame_dataunion/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/channels/chan_local.c?view=diff&rev=117214&r1=117213&r2=117214
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/channels/chan_local.c (original)
+++ team/mvanbaak/ast_frame_dataunion/channels/chan_local.c Mon May 19 16:03:38 2008
@@ -537,12 +537,9 @@
{
struct local_pvt *p = ast->tech_pvt;
int isoutbound;
- struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_HANGUP };
+ struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_HANGUP, data.uint32 = ast->hangupcause };
struct ast_channel *ochan = NULL;
int glaredetect = 0, res = 0;
- // because data/data_int is an anonymous member, we cannot set it at declaration
- // that's why we initialize it after declaring f
- f.data_int = ast->hangupcause;
if (!p)
return -1;
Modified: team/mvanbaak/ast_frame_dataunion/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/mvanbaak/ast_frame_dataunion/main/channel.c?view=diff&rev=117214&r1=117213&r2=117214
==============================================================================
--- team/mvanbaak/ast_frame_dataunion/main/channel.c (original)
+++ team/mvanbaak/ast_frame_dataunion/main/channel.c Mon May 19 16:03:38 2008
@@ -1030,7 +1030,7 @@
if (!ast_channel_trylock(chan)) {
chan->_softhangup |= AST_SOFTHANGUP_DEV;
if (cause < 0)
- f.data_int = chan->hangupcause;
+ f.data.uint32 = chan->hangupcause;
ast_channel_unlock(chan);
}
@@ -2440,7 +2440,7 @@
/* Interpret hangup and return NULL */
/* XXX why not the same for frames from the channel ? */
if (f->frametype == AST_FRAME_CONTROL && f->subclass == AST_CONTROL_HANGUP) {
- cause = f->data_int;
+ cause = f->data.uint32;
ast_frfree(f);
f = NULL;
}
More information about the svn-commits
mailing list