[svn-commits] seanbright: branch seanbright/resolve-shadow-warnings r117981 - in /team/sean...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu May 22 15:25:01 CDT 2008
Author: seanbright
Date: Thu May 22 15:25:01 2008
New Revision: 117981
URL: http://svn.digium.com/view/asterisk?view=rev&rev=117981
Log:
Merged revisions 117950 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r117950 | seanbright | 2008-05-22 16:01:33 -0400 (Thu, 22 May 2008) | 1 line
A couple more places the frame data change was missed.
........
Modified:
team/seanbright/resolve-shadow-warnings/ (props changed)
team/seanbright/resolve-shadow-warnings/apps/app_rpt.c
team/seanbright/resolve-shadow-warnings/channels/chan_usbradio.c
Propchange: team/seanbright/resolve-shadow-warnings/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu May 22 15:25:01 2008
@@ -1,1 +1,1 @@
-/trunk:1-117943
+/trunk:1-117958
Modified: team/seanbright/resolve-shadow-warnings/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_rpt.c?view=diff&rev=117981&r1=117980&r2=117981
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_rpt.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_rpt.c Thu May 22 15:25:01 2008
@@ -1876,7 +1876,7 @@
wf.offset = 0;
wf.mallocd = 0;
wf.datalen = strlen(txt) + 1;
- wf.data = txt;
+ wf.data.ptr = txt;
wf.samples = 0;
ast_write(myrpt->txchannel,&wf);
return 0;
@@ -5613,7 +5613,7 @@
/* if we found it, write it and were done */
if (!strcmp(l->name,myrpt->cmdnode))
{
- wf.data = str;
+ wf.data.ptr = str;
if (l->chan) ast_write(l->chan,&wf);
return;
}
@@ -5623,7 +5623,7 @@
/* if not, give it to everyone */
while(l != &myrpt->links)
{
- wf.data = str;
+ wf.data.ptr = str;
if (l->chan) ast_write(l->chan,&wf);
l = l->next;
}
@@ -5652,7 +5652,7 @@
/* give it to everyone */
while(l != &myrpt->links)
{
- wf.data = str;
+ wf.data.ptr = str;
if (l->chan) ast_write(l->chan,&wf);
l = l->next;
}
@@ -5954,7 +5954,7 @@
wf.mallocd = 0;
wf.datalen = strlen(discstr) + 1;
wf.samples = 0;
- wf.data = discstr;
+ wf.data.ptr = discstr;
if (l->chan)
{
ast_write(l->chan,&wf);
@@ -6069,7 +6069,7 @@
wf.mallocd = 0;
wf.datalen = strlen(discstr) + 1;
wf.samples = 0;
- wf.data = discstr;
+ wf.data.ptr = discstr;
if (l->chan)
{
ast_write(l->chan,&wf);
@@ -6751,7 +6751,7 @@
{
/* send, but not to src */
if (strcmp(l->name,src)) {
- wf.data = str;
+ wf.data.ptr = str;
if (l->chan) ast_write(l->chan,&wf);
}
return;
@@ -6779,7 +6779,7 @@
}
/* send, but not to src */
if (strcmp(l->name,src)) {
- wf.data = str;
+ wf.data.ptr = str;
if (l->chan) ast_write(l->chan,&wf);
}
l = l->next;
@@ -6798,7 +6798,7 @@
n = (int)(now - myrpt->lastkeyedtime);
}
sprintf(tmp1,"K %s %s %d %d",src,myrpt->name,myrpt->keyed,n);
- wf.data = tmp1;
+ wf.data.ptr = tmp1;
wf.datalen = strlen(tmp1) + 1;
if (mylink->chan) ast_write(mylink->chan,&wf);
return;
@@ -6876,7 +6876,7 @@
{
/* send, but not to src */
if (strcmp(l->name,src)) {
- wf.data = str;
+ wf.data.ptr = str;
if (l->chan) ast_write(l->chan,&wf);
}
return;
@@ -6900,7 +6900,7 @@
}
/* send, but not to src */
if (strcmp(l->name,src)) {
- wf.data = str;
+ wf.data.ptr = str;
if (l->chan) ast_write(l->chan,&wf);
}
l = l->next;
@@ -11691,7 +11691,7 @@
if (l->chan)
{
lf.datalen = strlen(lstr) + 1;
- lf.data = lstr;
+ lf.data.ptr = lstr;
ast_write(l->chan,&lf);
if (debug > 6) ast_log(LOG_NOTICE,
"@@@@ node %s sent node string %s to node %s\n",
@@ -12038,7 +12038,7 @@
#endif
if ((!myrpt->localtx) && (!myrpt->p.linktolink)) {
- memset(f->data,0,f->datalen);
+ memset(f->data.ptr,0,f->datalen);
}
#ifdef _MDC_DECODE_H_
@@ -12094,11 +12094,11 @@
dtmfed = 0;
if (ismuted)
{
- memset(f->data,0,f->datalen);
+ memset(f->data.ptr,0,f->datalen);
if (myrpt->lastf1)
- memset(myrpt->lastf1->data,0,myrpt->lastf1->datalen);
+ memset(myrpt->lastf1->data.ptr,0,myrpt->lastf1->datalen);
if (myrpt->lastf2)
- memset(myrpt->lastf2->data,0,myrpt->lastf2->datalen);
+ memset(myrpt->lastf2->data.ptr,0,myrpt->lastf2->datalen);
}
if (f) f2 = ast_frdup(f);
else f2 = NULL;
@@ -12108,9 +12108,9 @@
if (ismuted)
{
if (myrpt->lastf1)
- memset(myrpt->lastf1->data,0,myrpt->lastf1->datalen);
+ memset(myrpt->lastf1->data.ptr,0,myrpt->lastf1->datalen);
if (myrpt->lastf2)
- memset(myrpt->lastf2->data,0,myrpt->lastf2->datalen);
+ memset(myrpt->lastf2->data.ptr,0,myrpt->lastf2->datalen);
}
if (f1)
{
@@ -12122,9 +12122,9 @@
else if (f->frametype == AST_FRAME_DTMF_BEGIN)
{
if (myrpt->lastf1)
- memset(myrpt->lastf1->data,0,myrpt->lastf1->datalen);
+ memset(myrpt->lastf1->data.ptr,0,myrpt->lastf1->datalen);
if (myrpt->lastf2)
- memset(myrpt->lastf2->data,0,myrpt->lastf2->datalen);
+ memset(myrpt->lastf2->data.ptr,0,myrpt->lastf2->datalen);
dtmfed = 1;
}
#endif
@@ -12133,9 +12133,9 @@
c = (char) f->subclass; /* get DTMF char */
ast_frfree(f);
if (myrpt->lastf1)
- memset(myrpt->lastf1->data,0,myrpt->lastf1->datalen);
+ memset(myrpt->lastf1->data.ptr,0,myrpt->lastf1->datalen);
if (myrpt->lastf2)
- memset(myrpt->lastf2->data,0,myrpt->lastf2->datalen);
+ memset(myrpt->lastf2->data.ptr,0,myrpt->lastf2->datalen);
dtmfed = 1;
if (!myrpt->keyed) continue;
c = func_xlat(myrpt,c,&myrpt->p.inxlat);
@@ -12164,13 +12164,13 @@
{
donodelog(myrpt,"RXKEY,MAIN");
}
- if (f->datalen && f->data)
+ if (f->datalen && f->data.ptr)
{
char busy = 0;
- if (debug) ast_log(LOG_NOTICE,"Got PL %s on node %s\n",(char *)f->data,myrpt->name);
+ if (debug) ast_log(LOG_NOTICE,"Got PL %s on node %s\n",(char *)f->data.ptr,myrpt->name);
// ctcss code autopatch initiate
- if (strstr((char *)f->data,"/M/")&& !myrpt->macropatch)
+ if (strstr((char *)f->data.ptr,"/M/")&& !myrpt->macropatch)
{
char value[16];
strcat(value,"*6");
@@ -12183,16 +12183,16 @@
if(!busy){
myrpt->macrotimer = MACROTIME;
strncat(myrpt->macrobuf,value,MAXMACRO - 1);
- if (!busy) strcpy(myrpt->lasttone,(char*)f->data);
+ if (!busy) strcpy(myrpt->lasttone,(char*)f->data.ptr);
}
rpt_mutex_unlock(&myrpt->lock);
}
- else if (strcmp((char *)f->data,myrpt->lasttone))
+ else if (strcmp((char *)f->data.ptr,myrpt->lasttone))
{
- char *value = (char *) ast_variable_retrieve(myrpt->cfg, myrpt->p.tonemacro, (char *)f->data);
+ char *value = (char *) ast_variable_retrieve(myrpt->cfg, myrpt->p.tonemacro, (char *)f->data.ptr);
if (value)
{
- if (debug) ast_log(LOG_NOTICE,"Tone %s doing %s on node %s\n",(char *) f->data,value,myrpt->name);
+ if (debug) ast_log(LOG_NOTICE,"Tone %s doing %s on node %s\n",(char *) f->data.ptr,value,myrpt->name);
rpt_mutex_lock(&myrpt->lock);
if ((MAXMACRO - strlen(myrpt->macrobuf)) < strlen(value)){
rpt_mutex_unlock(&myrpt->lock);
@@ -12204,7 +12204,7 @@
}
rpt_mutex_unlock(&myrpt->lock);
}
- if (!busy) strcpy(myrpt->lasttone,(char*)f->data);
+ if (!busy) strcpy(myrpt->lasttone,(char*)f->data.ptr);
}
} else myrpt->lasttone[0] = 0;
}
@@ -12298,7 +12298,7 @@
for(;x < myrpt->p.simplexpatchdelay; x++)
{
vframe = ast_frdup(f);
- memset(vframe->data,0,vframe->datalen);
+ memset(vframe->data.ptr,0,vframe->datalen);
AST_LIST_INSERT_TAIL(&myrpt->txq,vframe,frame_list);
}
myfirst = 1;
@@ -12312,7 +12312,7 @@
frame_list) x++;
if (!x)
{
- memset(f->data,0,f->datalen);
+ memset(f->data.ptr,0,f->datalen);
}
else
{
@@ -12476,7 +12476,7 @@
if ((l->phonemode) && (l->phonevox))
{
n1 = dovox(&l->vox,
- f->data,f->datalen / 2);
+ f->data.ptr,f->datalen / 2);
if (n1 != l->wasvox)
{
if (debug)ast_log(LOG_DEBUG,"Link Node %s, vox %d\n",l->name,n1);
@@ -12495,7 +12495,7 @@
for(;x < myrpt->p.simplexphonedelay; x++)
{
f1 = ast_frdup(f);
- memset(f1->data,0,f1->datalen);
+ memset(f1->data.ptr,0,f1->datalen);
AST_LIST_INSERT_TAIL(&l->rxq,
f1,frame_list);
}
@@ -12508,7 +12508,7 @@
AST_LIST_TRAVERSE(&l->rxq, f1,frame_list) x++;
if (!x)
{
- memset(f->data,0,f->datalen);
+ memset(f->data.ptr,0,f->datalen);
}
else
{
@@ -12525,11 +12525,11 @@
l->dtmfed = 0;
if (ismuted)
{
- memset(f->data,0,f->datalen);
+ memset(f->data.ptr,0,f->datalen);
if (l->lastf1)
- memset(l->lastf1->data,0,l->lastf1->datalen);
+ memset(l->lastf1->data.ptr,0,l->lastf1->datalen);
if (l->lastf2)
- memset(l->lastf2->data,0,l->lastf2->datalen);
+ memset(l->lastf2->data.ptr,0,l->lastf2->datalen);
}
if (f) f2 = ast_frdup(f);
else f2 = NULL;
@@ -12539,9 +12539,9 @@
if (ismuted)
{
if (l->lastf1)
- memset(l->lastf1->data,0,l->lastf1->datalen);
+ memset(l->lastf1->data.ptr,0,l->lastf1->datalen);
if (l->lastf2)
- memset(l->lastf2->data,0,l->lastf2->datalen);
+ memset(l->lastf2->data.ptr,0,l->lastf2->datalen);
}
if (f1)
{
@@ -12552,7 +12552,7 @@
else
{
if (!l->lastrx)
- memset(f->data,0,f->datalen);
+ memset(f->data.ptr,0,f->datalen);
ast_write(l->pchan,f);
}
}
@@ -12560,22 +12560,22 @@
else if (f->frametype == AST_FRAME_DTMF_BEGIN)
{
if (l->lastf1)
- memset(l->lastf1->data,0,l->lastf1->datalen);
+ memset(l->lastf1->data.ptr,0,l->lastf1->datalen);
if (l->lastf2)
- memset(l->lastf2->data,0,l->lastf2->datalen);
+ memset(l->lastf2->data.ptr,0,l->lastf2->datalen);
l->dtmfed = 1;
}
#endif
if (f->frametype == AST_FRAME_TEXT)
{
- handle_link_data(myrpt,l,f->data);
+ handle_link_data(myrpt,l,f->data.ptr);
}
if (f->frametype == AST_FRAME_DTMF)
{
if (l->lastf1)
- memset(l->lastf1->data,0,l->lastf1->datalen);
+ memset(l->lastf1->data.ptr,0,l->lastf1->datalen);
if (l->lastf2)
- memset(l->lastf2->data,0,l->lastf2->datalen);
+ memset(l->lastf2->data.ptr,0,l->lastf2->datalen);
l->dtmfed = 1;
handle_link_phone_dtmf(myrpt,l,f->subclass);
}
@@ -12825,7 +12825,7 @@
}
if (f->frametype == AST_FRAME_VOICE)
{
- n = dovox(&myrpt->vox,f->data,f->datalen / 2);
+ n = dovox(&myrpt->vox,f->data.ptr,f->datalen / 2);
if (n != myrpt->wasvox)
{
if (debug) ast_log(LOG_DEBUG,"Node %s, vox %d\n",myrpt->name,n);
@@ -14339,11 +14339,11 @@
dtmfed = 0;
if (ismuted)
{
- memset(f->data,0,f->datalen);
+ memset(f->data.ptr,0,f->datalen);
if (myrpt->lastf1)
- memset(myrpt->lastf1->data,0,myrpt->lastf1->datalen);
+ memset(myrpt->lastf1->data.ptr,0,myrpt->lastf1->datalen);
if (myrpt->lastf2)
- memset(myrpt->lastf2->data,0,myrpt->lastf2->datalen);
+ memset(myrpt->lastf2->data.ptr,0,myrpt->lastf2->datalen);
}
if (f) f2 = ast_frdup(f);
else f2 = NULL;
@@ -14353,9 +14353,9 @@
if (ismuted)
{
if (myrpt->lastf1)
- memset(myrpt->lastf1->data,0,myrpt->lastf1->datalen);
+ memset(myrpt->lastf1->data.ptr,0,myrpt->lastf1->datalen);
if (myrpt->lastf2)
- memset(myrpt->lastf2->data,0,myrpt->lastf2->datalen);
+ memset(myrpt->lastf2->data.ptr,0,myrpt->lastf2->datalen);
}
if (f1)
{
@@ -14370,18 +14370,18 @@
else if (f->frametype == AST_FRAME_DTMF_BEGIN)
{
if (myrpt->lastf1)
- memset(myrpt->lastf1->data,0,myrpt->lastf1->datalen);
+ memset(myrpt->lastf1->data.ptr,0,myrpt->lastf1->datalen);
if (myrpt->lastf2)
- memset(myrpt->lastf2->data,0,myrpt->lastf2->datalen);
+ memset(myrpt->lastf2->data.ptr,0,myrpt->lastf2->datalen);
dtmfed = 1;
}
#endif
if (f->frametype == AST_FRAME_DTMF)
{
if (myrpt->lastf1)
- memset(myrpt->lastf1->data,0,myrpt->lastf1->datalen);
+ memset(myrpt->lastf1->data.ptr,0,myrpt->lastf1->datalen);
if (myrpt->lastf2)
- memset(myrpt->lastf2->data,0,myrpt->lastf2->datalen);
+ memset(myrpt->lastf2->data.ptr,0,myrpt->lastf2->datalen);
dtmfed = 1;
if (handle_remote_phone_dtmf(myrpt,f->subclass,&keyed,phone_mode) == -1)
{
@@ -14392,7 +14392,7 @@
}
if (f->frametype == AST_FRAME_TEXT)
{
- if (handle_remote_data(myrpt,f->data) == -1)
+ if (handle_remote_data(myrpt,f->data.ptr) == -1)
{
if (debug) printf("@@@@ rpt:Hung Up\n");
ast_frfree(f);
@@ -14444,7 +14444,7 @@
((myrpt->remote) && (myrpt->remotetx)) ||
((myrpt->remmode != REM_MODE_FM) &&
notremming))
- memset(f->data,0,f->datalen);
+ memset(f->data.ptr,0,f->datalen);
ast_write(myrpt->pchannel,f);
}
else if (f->frametype == AST_FRAME_CONTROL)
Modified: team/seanbright/resolve-shadow-warnings/channels/chan_usbradio.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/channels/chan_usbradio.c?view=diff&rev=117981&r1=117980&r2=117981
==============================================================================
--- team/seanbright/resolve-shadow-warnings/channels/chan_usbradio.c (original)
+++ team/seanbright/resolve-shadow-warnings/channels/chan_usbradio.c Thu May 22 15:25:01 2008
@@ -1769,7 +1769,7 @@
i16 i, tbuff[f->datalen];
for(i=0;i<f->datalen;i+=2)
{
- tbuff[i]= ((i16*)(f->data))[i/2];
+ tbuff[i]= ((i16*)(f->data.ptr))[i/2];
tbuff[i+1]= o->txkeyed*M_Q13;
}
fwrite(tbuff,2,f->datalen,ftxcapraw);
@@ -1779,7 +1779,7 @@
// maw just take the data from the network and save it for PmrRx processing
- PmrTx(o->pmrChan,(i16*)f->data);
+ PmrTx(o->pmrChan,(i16*)f->data.ptr);
return 0;
}
@@ -2047,7 +2047,7 @@
wf.subclass = AST_CONTROL_RADIO_KEY;
if(o->rxctcssdecode)
{
- wf.data = o->rxctcssfreq;
+ wf.data.ptr = o->rxctcssfreq;
wf.datalen = strlen(o->rxctcssfreq) + 1;
TRACEO(1,("AST_CONTROL_RADIO_KEY text=%s\n",o->rxctcssfreq));
}
@@ -2062,10 +2062,10 @@
f->subclass = AST_FORMAT_SLINEAR;
f->samples = FRAME_SIZE;
f->datalen = FRAME_SIZE * 2;
- f->data = o->usbradio_read_buf_8k + AST_FRIENDLY_OFFSET;
+ f->data.ptr = o->usbradio_read_buf_8k + AST_FRIENDLY_OFFSET;
if (o->boost != BOOST_SCALE) { /* scale and clip values */
int i, x;
- int16_t *p = (int16_t *) f->data;
+ int16_t *p = (int16_t *) f->data.ptr;
for (i = 0; i < f->samples; i++) {
x = (p[i] * o->boost) / BOOST_SCALE;
if (x > 32767)
More information about the svn-commits
mailing list