[svn-commits] ctooley: branch ctooley/excel-sip-changes r117831 - in /team/ctooley/excel-si...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu May 22 12:14:01 CDT 2008
Author: ctooley
Date: Thu May 22 12:14:00 2008
New Revision: 117831
URL: http://svn.digium.com/view/asterisk?view=rev&rev=117831
Log:
Merged revisions 117792,117794,117802,117812,117822 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r117792 | seanbright | 2008-05-22 10:49:17 -0500 (Thu, 22 May 2008) | 1 line
Minor text fix. roster -> resource.
................
r117794 | mmichelson | 2008-05-22 11:05:18 -0500 (Thu, 22 May 2008) | 3 lines
Committing a fix pointed out by Atis Lezdins on the asterisk-dev list. Thanks!
................
r117802 | mvanbaak | 2008-05-22 11:29:54 -0500 (Thu, 22 May 2008) | 21 lines
- 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
................
r117812 | tilghman | 2008-05-22 11:50:32 -0500 (Thu, 22 May 2008) | 13 lines
Blocked revisions 117809 via svnmerge
........
r117809 | tilghman | 2008-05-22 11:47:03 -0500 (Thu, 22 May 2008) | 6 lines
Take into account the length of delimiters when calculating result string length.
(closes issue #12696)
Reported by: adomjan
Patches:
func_realtime.c-longdelimiter.patch uploaded by adomjan (license 487)
........
................
r117822 | mvanbaak | 2008-05-22 12:06:00 -0500 (Thu, 22 May 2008) | 2 lines
forgot chan_misdn
................
Modified:
team/ctooley/excel-sip-changes/ (props changed)
team/ctooley/excel-sip-changes/apps/app_alarmreceiver.c
team/ctooley/excel-sip-changes/apps/app_chanspy.c
team/ctooley/excel-sip-changes/apps/app_dial.c
team/ctooley/excel-sip-changes/apps/app_disa.c
team/ctooley/excel-sip-changes/apps/app_externalivr.c
team/ctooley/excel-sip-changes/apps/app_festival.c
team/ctooley/excel-sip-changes/apps/app_followme.c
team/ctooley/excel-sip-changes/apps/app_ices.c
team/ctooley/excel-sip-changes/apps/app_meetme.c
team/ctooley/excel-sip-changes/apps/app_milliwatt.c
team/ctooley/excel-sip-changes/apps/app_mp3.c
team/ctooley/excel-sip-changes/apps/app_nbscat.c
team/ctooley/excel-sip-changes/apps/app_queue.c
team/ctooley/excel-sip-changes/apps/app_sms.c
team/ctooley/excel-sip-changes/apps/app_speech_utils.c
team/ctooley/excel-sip-changes/apps/app_test.c
team/ctooley/excel-sip-changes/apps/app_zapbarge.c
team/ctooley/excel-sip-changes/apps/app_zapscan.c
team/ctooley/excel-sip-changes/channels/chan_alsa.c
team/ctooley/excel-sip-changes/channels/chan_console.c
team/ctooley/excel-sip-changes/channels/chan_gtalk.c
team/ctooley/excel-sip-changes/channels/chan_h323.c
team/ctooley/excel-sip-changes/channels/chan_iax2.c
team/ctooley/excel-sip-changes/channels/chan_jingle.c
team/ctooley/excel-sip-changes/channels/chan_local.c
team/ctooley/excel-sip-changes/channels/chan_mgcp.c
team/ctooley/excel-sip-changes/channels/chan_misdn.c
team/ctooley/excel-sip-changes/channels/chan_oss.c
team/ctooley/excel-sip-changes/channels/chan_phone.c
team/ctooley/excel-sip-changes/channels/chan_sip.c
team/ctooley/excel-sip-changes/channels/chan_skinny.c
team/ctooley/excel-sip-changes/channels/chan_unistim.c
team/ctooley/excel-sip-changes/channels/chan_zap.c
team/ctooley/excel-sip-changes/channels/iax2-parser.c
team/ctooley/excel-sip-changes/codecs/codec_a_mu.c
team/ctooley/excel-sip-changes/codecs/codec_adpcm.c
team/ctooley/excel-sip-changes/codecs/codec_alaw.c
team/ctooley/excel-sip-changes/codecs/codec_g722.c
team/ctooley/excel-sip-changes/codecs/codec_g726.c
team/ctooley/excel-sip-changes/codecs/codec_gsm.c
team/ctooley/excel-sip-changes/codecs/codec_lpc10.c
team/ctooley/excel-sip-changes/codecs/codec_resample.c
team/ctooley/excel-sip-changes/codecs/codec_ulaw.c
team/ctooley/excel-sip-changes/codecs/codec_zap.c
team/ctooley/excel-sip-changes/configs/jabber.conf.sample
team/ctooley/excel-sip-changes/formats/format_g723.c
team/ctooley/excel-sip-changes/formats/format_g726.c
team/ctooley/excel-sip-changes/formats/format_g729.c
team/ctooley/excel-sip-changes/formats/format_gsm.c
team/ctooley/excel-sip-changes/formats/format_h263.c
team/ctooley/excel-sip-changes/formats/format_h264.c
team/ctooley/excel-sip-changes/formats/format_ilbc.c
team/ctooley/excel-sip-changes/formats/format_jpeg.c
team/ctooley/excel-sip-changes/formats/format_pcm.c
team/ctooley/excel-sip-changes/formats/format_sln.c
team/ctooley/excel-sip-changes/formats/format_sln16.c
team/ctooley/excel-sip-changes/formats/format_vox.c
team/ctooley/excel-sip-changes/formats/format_wav.c
team/ctooley/excel-sip-changes/formats/format_wav_gsm.c
team/ctooley/excel-sip-changes/include/asterisk/channel.h
team/ctooley/excel-sip-changes/include/asterisk/frame.h
team/ctooley/excel-sip-changes/main/abstract_jb.c
team/ctooley/excel-sip-changes/main/app.c
team/ctooley/excel-sip-changes/main/audiohook.c
team/ctooley/excel-sip-changes/main/channel.c
team/ctooley/excel-sip-changes/main/dsp.c
team/ctooley/excel-sip-changes/main/features.c
team/ctooley/excel-sip-changes/main/file.c
team/ctooley/excel-sip-changes/main/frame.c
team/ctooley/excel-sip-changes/main/indications.c
team/ctooley/excel-sip-changes/main/rtp.c
team/ctooley/excel-sip-changes/main/slinfactory.c
team/ctooley/excel-sip-changes/main/translate.c
team/ctooley/excel-sip-changes/main/udptl.c
team/ctooley/excel-sip-changes/res/res_adsi.c
team/ctooley/excel-sip-changes/res/res_agi.c
team/ctooley/excel-sip-changes/res/res_musiconhold.c
Propchange: team/ctooley/excel-sip-changes/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.
Propchange: team/ctooley/excel-sip-changes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu May 22 12:14:00 2008
@@ -1,1 +1,1 @@
-/trunk:1-117790
+/trunk:1-117823
Modified: team/ctooley/excel-sip-changes/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_alarmreceiver.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_alarmreceiver.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_alarmreceiver.c Thu May 22 12:14:00 2008
@@ -185,7 +185,7 @@
wf.subclass = AST_FORMAT_ULAW;
wf.offset = AST_FRIENDLY_OFFSET;
wf.mallocd = 0;
- wf.data = tone_block.buf;
+ wf.data.ptr = tone_block.buf;
wf.datalen = f->datalen;
wf.samples = wf.datalen;
@@ -252,8 +252,8 @@
/* If they hung up, leave */
if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP)) {
- if (f->seqno) {
- chan->hangupcause = f->seqno;
+ if (f->data.uint32) {
+ chan->hangupcause = f->data.uint32;
}
ast_frfree(f);
res = -1;
Modified: team/ctooley/excel-sip-changes/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_chanspy.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_chanspy.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_chanspy.c Thu May 22 12:14:00 2008
@@ -263,7 +263,7 @@
}
if (csth->fd)
- write(csth->fd, f->data, f->datalen);
+ write(csth->fd, f->data.ptr, f->datalen);
ast_frfree(f);
Modified: team/ctooley/excel-sip-changes/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_dial.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_dial.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_dial.c Thu May 22 12:14:00 2008
@@ -765,7 +765,7 @@
}
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 @@
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 @@
/* 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 @@
(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);
}
Modified: team/ctooley/excel-sip-changes/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_disa.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_disa.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_disa.c Thu May 22 12:14:00 2008
@@ -195,8 +195,8 @@
}
if ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP)) {
- if (f->seqno)
- chan->hangupcause = f->seqno;
+ 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/ctooley/excel-sip-changes/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_externalivr.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_externalivr.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_externalivr.c Thu May 22 12:14:00 2008
@@ -630,8 +630,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->seqno) {
- chan->hangupcause = f->seqno;
+ if (f->data.uint32) {
+ chan->hangupcause = f->data.uint32;
}
ast_frfree(f);
res = -1;
Modified: team/ctooley/excel-sip-changes/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_festival.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_festival.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_festival.c Thu May 22 12:14:00 2008
@@ -218,7 +218,7 @@
myf.f.samples = res / 2;
myf.f.offset = AST_FRIENDLY_OFFSET;
myf.f.src = __PRETTY_FUNCTION__;
- myf.f.data = myf.frdata;
+ myf.f.data.ptr = myf.frdata;
if (ast_write(chan, &myf.f) < 0) {
res = -1;
ast_frfree(f);
Modified: team/ctooley/excel-sip-changes/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_followme.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_followme.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_followme.c Thu May 22 12:14:00 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->seqno) {
- winner->hangupcause = f->seqno;
+ 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/ctooley/excel-sip-changes/apps/app_ices.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_ices.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_ices.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_ices.c Thu May 22 12:14:00 2008
@@ -157,7 +157,7 @@
break;
}
if (f->frametype == AST_FRAME_VOICE) {
- res = write(fds[1], f->data, f->datalen);
+ res = write(fds[1], f->data.ptr, f->datalen);
if (res < 0) {
if (errno != EAGAIN) {
ast_log(LOG_WARNING, "Write failed to pipe: %s\n", strerror(errno));
Modified: team/ctooley/excel-sip-changes/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_meetme.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_meetme.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_meetme.c Thu May 22 12:14:00 2008
@@ -2342,7 +2342,7 @@
to write out all the samples.
*/
if (user->talking)
- careful_write(fd, f->data, f->datalen, 0);
+ careful_write(fd, f->data.ptr, f->datalen, 0);
}
} else if ((f->frametype == AST_FRAME_DTMF) && (confflags & CONFFLAG_EXIT_CONTEXT)) {
char tmp[2];
@@ -2566,7 +2566,7 @@
fr.subclass = AST_FORMAT_SLINEAR;
fr.datalen = res;
fr.samples = res / 2;
- fr.data = buf;
+ fr.data.ptr = buf;
fr.offset = AST_FRIENDLY_OFFSET;
if (!user->listen.actual &&
((confflags & CONFFLAG_MONITOR) ||
Modified: team/ctooley/excel-sip-changes/apps/app_milliwatt.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_milliwatt.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_milliwatt.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_milliwatt.c Thu May 22 12:14:00 2008
@@ -61,9 +61,9 @@
.frametype = AST_FRAME_VOICE,
.subclass = AST_FORMAT_ULAW,
.offset = AST_FRIENDLY_OFFSET,
- .data = buf + AST_FRIENDLY_OFFSET,
.src = __FUNCTION__,
};
+ wf.data.ptr = buf + AST_FRIENDLY_OFFSET;
/* Instead of len, use samples, because channel.c generator_force
* generate(chan, tmp, 0, 160) ignores len. In any case, len is
Modified: team/ctooley/excel-sip-changes/apps/app_mp3.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_mp3.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_mp3.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_mp3.c Thu May 22 12:14:00 2008
@@ -167,7 +167,7 @@
myf.f.src = __PRETTY_FUNCTION__;
myf.f.delivery.tv_sec = 0;
myf.f.delivery.tv_usec = 0;
- myf.f.data = myf.frdata;
+ myf.f.data.ptr = myf.frdata;
if (ast_write(chan, &myf.f) < 0) {
res = -1;
break;
Modified: team/ctooley/excel-sip-changes/apps/app_nbscat.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_nbscat.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_nbscat.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_nbscat.c Thu May 22 12:14:00 2008
@@ -150,7 +150,7 @@
myf.f.src = __PRETTY_FUNCTION__;
myf.f.delivery.tv_sec = 0;
myf.f.delivery.tv_usec = 0;
- myf.f.data = myf.frdata;
+ myf.f.data.ptr = myf.frdata;
if (ast_write(chan, &myf.f) < 0) {
res = -1;
break;
Modified: team/ctooley/excel-sip-changes/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_queue.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_queue.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_queue.c Thu May 22 12:14:00 2008
@@ -2669,8 +2669,9 @@
/* Got hung up */
*to = -1;
if (f) {
- if (f->seqno)
- in->hangupcause = f->seqno;
+ if (f->data.uint32) {
+ in->hangupcause = f->data.uint32;
+ }
ast_frfree(f);
}
return NULL;
@@ -3943,12 +3944,15 @@
ao2_ref(mem, -1);
}
}
+
+ if (!ast_strlen_zero(queuename) && !strcasecmp(queuename, q->name)) {
+ ao2_unlock(q);
+ queue_unref(q);
+ break;
+ }
+
ao2_unlock(q);
queue_unref(q);
-
- if (!ast_strlen_zero(queuename) && found) {
- break;
- }
}
return found ? RESULT_SUCCESS : RESULT_FAILURE;
Modified: team/ctooley/excel-sip-changes/apps/app_sms.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_sms.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_sms.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_sms.c Thu May 22 12:14:00 2008
@@ -1501,7 +1501,7 @@
f.datalen = samples * sizeof(*buf);
f.offset = AST_FRIENDLY_OFFSET;
f.mallocd = 0;
- f.data = buf;
+ f.data.ptr = buf;
f.samples = samples;
f.src = "app_sms";
/* create a buffer containing the digital sms pattern */
@@ -1905,7 +1905,7 @@
break;
}
if (f->frametype == AST_FRAME_VOICE) {
- sms_process(&h, f->samples, f->data);
+ sms_process(&h, f->samples, f->data.ptr);
}
ast_frfree(f);
Modified: team/ctooley/excel-sip-changes/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_speech_utils.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_speech_utils.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_speech_utils.c Thu May 22 12:14:00 2008
@@ -647,7 +647,7 @@
}
/* Write audio frame out to speech engine if no DTMF has been received */
if (!strlen(dtmf) && f != NULL && f->frametype == AST_FRAME_VOICE) {
- ast_speech_write(speech, f->data, f->datalen);
+ ast_speech_write(speech, f->data.ptr, f->datalen);
}
break;
case AST_SPEECH_STATE_WAIT:
Modified: team/ctooley/excel-sip-changes/apps/app_test.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_test.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_test.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_test.c Thu May 22 12:14:00 2008
@@ -84,7 +84,7 @@
break;
}
if ((f->frametype == AST_FRAME_VOICE) && (f->subclass == AST_FORMAT_SLINEAR)) {
- foo = (short *)f->data;
+ foo = (short *)f->data.ptr;
for (x=0;x<f->samples;x++) {
noise += abs(foo[x]);
samples++;
Modified: team/ctooley/excel-sip-changes/apps/app_zapbarge.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_zapbarge.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_zapbarge.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_zapbarge.c Thu May 22 12:14:00 2008
@@ -207,7 +207,7 @@
if (f->frametype == AST_FRAME_VOICE) {
if (f->subclass == AST_FORMAT_ULAW) {
/* Carefully write */
- careful_write(fd, f->data, f->datalen);
+ careful_write(fd, f->data.ptr, f->datalen);
} else
ast_log(LOG_WARNING, "Huh? Got a non-ulaw (%d) frame in the conference\n", f->subclass);
}
@@ -221,7 +221,7 @@
fr.subclass = AST_FORMAT_ULAW;
fr.datalen = res;
fr.samples = res;
- fr.data = buf;
+ fr.data.ptr = buf;
fr.offset = AST_FRIENDLY_OFFSET;
if (ast_write(chan, &fr) < 0) {
ast_log(LOG_WARNING, "Unable to write frame to channel: %s\n", strerror(errno));
Modified: team/ctooley/excel-sip-changes/apps/app_zapscan.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/apps/app_zapscan.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/apps/app_zapscan.c (original)
+++ team/ctooley/excel-sip-changes/apps/app_zapscan.c Thu May 22 12:14:00 2008
@@ -231,7 +231,7 @@
if (f->frametype == AST_FRAME_VOICE) {
if (f->subclass == AST_FORMAT_ULAW) {
/* Carefully write */
- careful_write(fd, f->data, f->datalen);
+ careful_write(fd, f->data.ptr, f->datalen);
} else {
ast_log(LOG_WARNING, "Huh? Got a non-ulaw (%d) frame in the conference\n", f->subclass);
}
@@ -246,7 +246,7 @@
fr.subclass = AST_FORMAT_ULAW;
fr.datalen = res;
fr.samples = res;
- fr.data = buf;
+ fr.data.ptr = buf;
fr.offset = AST_FRIENDLY_OFFSET;
if (ast_write(chan, &fr) < 0) {
ast_log(LOG_WARNING, "Unable to write frame to channel: %s\n", strerror(errno));
Modified: team/ctooley/excel-sip-changes/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/channels/chan_alsa.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/channels/chan_alsa.c (original)
+++ team/ctooley/excel-sip-changes/channels/chan_alsa.c Thu May 22 12:14:00 2008
@@ -377,7 +377,7 @@
ast_log(LOG_WARNING, "Frame too large\n");
res = -1;
} else {
- memcpy(sizbuf + sizpos, f->data, f->datalen);
+ memcpy(sizbuf + sizpos, f->data.ptr, f->datalen);
len += f->datalen;
pos = 0;
state = snd_pcm_state(alsa.ocard);
@@ -426,7 +426,7 @@
f.subclass = 0;
f.samples = 0;
f.datalen = 0;
- f.data = NULL;
+ f.data.ptr = NULL;
f.offset = 0;
f.src = "Console";
f.mallocd = 0;
@@ -471,7 +471,7 @@
f.subclass = AST_FORMAT_SLINEAR;
f.samples = FRAME_SIZE;
f.datalen = FRAME_SIZE * 2;
- f.data = buf;
+ f.data.ptr = buf;
f.offset = AST_FRIENDLY_OFFSET;
f.src = "Console";
f.mallocd = 0;
@@ -718,14 +718,14 @@
}
text2send[strlen(text2send) - 1] = '\n';
- f.data = text2send;
+ f.data.ptr = text2send;
f.datalen = strlen(text2send) + 1;
grab_owner();
if (alsa.owner) {
ast_queue_frame(alsa.owner, &f);
f.frametype = AST_FRAME_CONTROL;
f.subclass = AST_CONTROL_ANSWER;
- f.data = NULL;
+ f.data.ptr = NULL;
f.datalen = 0;
ast_queue_frame(alsa.owner, &f);
ast_channel_unlock(alsa.owner);
@@ -765,7 +765,7 @@
hookstate = 0;
grab_owner();
if (alsa.owner) {
- ast_queue_hangup(alsa.owner, AST_CAUSE_NORMAL_CLEARING);
+ ast_queue_hangup_with_cause(alsa.owner, AST_CAUSE_NORMAL_CLEARING);
ast_channel_unlock(alsa.owner);
}
}
Modified: team/ctooley/excel-sip-changes/channels/chan_console.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/channels/chan_console.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/channels/chan_console.c (original)
+++ team/ctooley/excel-sip-changes/channels/chan_console.c Thu May 22 12:14:00 2008
@@ -874,7 +874,7 @@
pvt->hookstate = 0;
if (pvt->owner)
- ast_queue_hangup(pvt->owner, -1);
+ ast_queue_hangup(pvt->owner);
unref_pvt(pvt);
Modified: team/ctooley/excel-sip-changes/channels/chan_gtalk.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/channels/chan_gtalk.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/channels/chan_gtalk.c (original)
+++ team/ctooley/excel-sip-changes/channels/chan_gtalk.c Thu May 22 12:14:00 2008
@@ -620,7 +620,7 @@
ast_getformatname_multiple(s2, BUFSIZ, tmp->peercapability),
ast_getformatname_multiple(s3, BUFSIZ, tmp->jointcapability));
/* close session if capabilities don't match */
- ast_queue_hangup(tmp->owner, -1);
+ ast_queue_hangup(tmp->owner);
return -1;
@@ -749,7 +749,7 @@
if (tmp) {
tmp->alreadygone = 1;
if (tmp->owner)
- ast_queue_hangup(tmp->owner, -1);
+ ast_queue_hangup(tmp->owner);
} else
ast_log(LOG_NOTICE, "Whoa, didn't find call!\n");
gtalk_response(client, from, pak, NULL, NULL);
Modified: team/ctooley/excel-sip-changes/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/channels/chan_h323.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/channels/chan_h323.c (original)
+++ team/ctooley/excel-sip-changes/channels/chan_h323.c Thu May 22 12:14:00 2008
@@ -342,7 +342,7 @@
ast_debug(1, "Process pending hangup for %s\n", c->name);
c->_softhangup |= AST_SOFTHANGUP_DEV;
c->hangupcause = pvt->hangupcause;
- ast_queue_hangup(c, pvt->hangupcause);
+ ast_queue_hangup_with_cause(c, pvt->hangupcause);
pvt->needhangup = 0;
pvt->newstate = pvt->newcontrol = pvt->newdigit = pvt->DTMFsched = -1;
}
@@ -2379,7 +2379,7 @@
/* Send hangup */
if (pvt->owner) {
pvt->owner->_softhangup |= AST_SOFTHANGUP_DEV;
- ast_queue_hangup(pvt->owner, -1);
+ ast_queue_hangup(pvt->owner);
ast_channel_unlock(pvt->owner);
}
ast_mutex_unlock(&pvt->lock);
@@ -2404,7 +2404,7 @@
if (pvt->owner && !ast_channel_trylock(pvt->owner)) {
pvt->owner->_softhangup |= AST_SOFTHANGUP_DEV;
pvt->owner->hangupcause = pvt->hangupcause = cause;
- ast_queue_hangup(pvt->owner, cause);
+ ast_queue_hangup_with_cause(pvt->owner, cause);
ast_channel_unlock(pvt->owner);
}
else {
Modified: team/ctooley/excel-sip-changes/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/channels/chan_iax2.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/channels/chan_iax2.c (original)
+++ team/ctooley/excel-sip-changes/channels/chan_iax2.c Thu May 22 12:14:00 2008
@@ -1783,7 +1783,7 @@
usleep(1);
ast_mutex_lock(&iaxsl[callno]);
} else {
- ast_queue_hangup(iaxs[callno]->owner, -1);
+ ast_queue_hangup(iaxs[callno]->owner);
ast_channel_unlock(iaxs[callno]->owner);
break;
}
@@ -2244,7 +2244,7 @@
/* If there's an owner, prod it to give up */
/* It is ok to use ast_queue_hangup() here instead of iax2_queue_hangup()
* because we already hold the owner channel lock. */
- ast_queue_hangup(owner, -1);
+ ast_queue_hangup(owner);
}
if (pvt->peercallno) {
@@ -2312,7 +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, .seqno = 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 */
@@ -3030,7 +3030,7 @@
static int iax2_sendimage(struct ast_channel *c, struct ast_frame *img)
{
- return send_command_locked(PTR_TO_CALLNO(c->tech_pvt), AST_FRAME_IMAGE, img->subclass, 0, img->data, img->datalen, -1);
+ return send_command_locked(PTR_TO_CALLNO(c->tech_pvt), AST_FRAME_IMAGE, img->subclass, 0, img->data.ptr, img->datalen, -1);
}
static int iax2_sendhtml(struct ast_channel *c, int subclass, const char *data, int datalen)
@@ -4418,7 +4418,7 @@
tpeer->trunkdatalen += sizeof(struct ast_iax2_meta_trunk_entry);
}
/* Copy actual trunk data */
- memcpy(ptr, f->data, f->datalen);
+ memcpy(ptr, f->data.ptr, f->datalen);
tpeer->trunkdatalen += f->datalen;
tpeer->calls++;
@@ -4698,7 +4698,7 @@
else
fr->oseqno = pvt->oseqno++;
fr->iseqno = pvt->iseqno;
- fh = (struct ast_iax2_full_hdr *)(fr->af.data - sizeof(struct ast_iax2_full_hdr));
+ fh = (struct ast_iax2_full_hdr *)(fr->af.data.ptr - sizeof(struct ast_iax2_full_hdr));
fh->scallno = htons(fr->callno | IAX_FLAG_FULL);
fh->ts = htonl(fr->ts);
fh->oseqno = fr->oseqno;
@@ -4763,7 +4763,7 @@
/* Video frame have no sequence number */
fr->oseqno = -1;
fr->iseqno = -1;
- vh = (struct ast_iax2_video_hdr *)(fr->af.data - sizeof(struct ast_iax2_video_hdr));
+ vh = (struct ast_iax2_video_hdr *)(fr->af.data.ptr - sizeof(struct ast_iax2_video_hdr));
vh->zeros = 0;
vh->callno = htons(0x8000 | fr->callno);
vh->ts = htons((fr->ts & 0x7FFF) | (fr->af.subclass & 0x1 ? 0x8000 : 0));
@@ -4779,7 +4779,7 @@
fr->oseqno = -1;
fr->iseqno = -1;
/* Mini frame will do */
- mh = (struct ast_iax2_mini_hdr *)(fr->af.data - sizeof(struct ast_iax2_mini_hdr));
+ mh = (struct ast_iax2_mini_hdr *)(fr->af.data.ptr - sizeof(struct ast_iax2_mini_hdr));
mh->callno = htons(fr->callno);
mh->ts = htons(fr->ts & 0xFFFF);
fr->datalen = fr->af.datalen + sizeof(struct ast_iax2_mini_hdr);
@@ -5666,7 +5666,7 @@
f.subclass = command;
f.datalen = datalen;
f.src = __FUNCTION__;
- f.data = (void *) data;
+ f.data.ptr = (void *) data;
return iax2_send(i, &f, ts, seqno, now, transfer, final, media);
}
@@ -7810,9 +7810,9 @@
f.datalen = len;
if (f.datalen >= 0) {
if (f.datalen)
- f.data = ptr;
+ f.data.ptr = ptr;
else
- f.data = NULL;
+ f.data.ptr = NULL;
if (trunked_ts)
fr->ts = (iaxs[fr->callno]->last & 0xFFFF0000L) | (trunked_ts & 0xffff);
else
@@ -8217,15 +8217,15 @@
ast_mutex_unlock(&iaxsl[fr->callno]);
return 1;
}
- f.data = NULL;
+ f.data.ptr = NULL;
f.datalen = 0;
} else
- f.data = thread->buf + sizeof(*fh);
+ f.data.ptr = thread->buf + sizeof(*fh);
} else {
if (f.frametype == AST_FRAME_IAX)
- f.data = NULL;
+ f.data.ptr = NULL;
else
- f.data = empty;
+ f.data.ptr = empty;
memset(&ies, 0, sizeof(ies));
}
@@ -9421,9 +9421,9 @@
}
f.datalen = res - sizeof(*vh);
if (f.datalen)
- f.data = thread->buf + sizeof(*vh);
+ f.data.ptr = thread->buf + sizeof(*vh);
else
- f.data = NULL;
+ f.data.ptr = NULL;
#ifdef IAXTESTS
if (test_resync) {
fr->ts = (iaxs[fr->callno]->last & 0xFFFF8000L) | ((ntohs(vh->ts) + test_resync) & 0x7fff);
@@ -9448,9 +9448,9 @@
return 1;
}
if (f.datalen)
- f.data = thread->buf + sizeof(*mh);
+ f.data.ptr = thread->buf + sizeof(*mh);
else
- f.data = NULL;
+ f.data.ptr = NULL;
#ifdef IAXTESTS
if (test_resync) {
fr->ts = (iaxs[fr->callno]->last & 0xFFFF0000L) | ((ntohs(mh->ts) + test_resync) & 0xffff);
Modified: team/ctooley/excel-sip-changes/channels/chan_jingle.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/channels/chan_jingle.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/channels/chan_jingle.c (original)
+++ team/ctooley/excel-sip-changes/channels/chan_jingle.c Thu May 22 12:14:00 2008
@@ -573,7 +573,7 @@
if (tmp) {
tmp->alreadygone = 1;
if (tmp->owner)
- ast_queue_hangup(tmp->owner, -1);
+ ast_queue_hangup(tmp->owner);
} else
ast_log(LOG_NOTICE, "Whoa, didn't find call!\n");
jingle_response(client, pak, NULL, NULL);
Modified: team/ctooley/excel-sip-changes/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/channels/chan_local.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/channels/chan_local.c (original)
+++ team/ctooley/excel-sip-changes/channels/chan_local.c Thu May 22 12:14:00 2008
@@ -396,7 +396,7 @@
ast_mutex_lock(&p->lock);
isoutbound = IS_OUTBOUND(ast, p);
f.subclass = condition;
- f.data = (void*)data;
+ f.data.ptr = (void*)data;
f.datalen = datalen;
if (!(res = local_queue_frame(p, isoutbound, &f, ast, 1)))
ast_mutex_unlock(&p->lock);
@@ -456,7 +456,7 @@
ast_mutex_lock(&p->lock);
isoutbound = IS_OUTBOUND(ast, p);
- f.data = (char *) text;
+ f.data.ptr = (char *) text;
f.datalen = strlen(text) + 1;
if (!(res = local_queue_frame(p, isoutbound, &f, ast, 0)))
ast_mutex_unlock(&p->lock);
@@ -476,7 +476,7 @@
ast_mutex_lock(&p->lock);
isoutbound = IS_OUTBOUND(ast, p);
f.subclass = subclass;
- f.data = (char *)data;
+ f.data.ptr = (char *)data;
f.datalen = datalen;
if (!(res = local_queue_frame(p, isoutbound, &f, ast, 0)))
ast_mutex_unlock(&p->lock);
@@ -537,7 +537,7 @@
{
struct local_pvt *p = ast->tech_pvt;
int isoutbound;
- struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_HANGUP, .seqno = ast->hangupcause };
+ struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_HANGUP, .data.uint32 = ast->hangupcause };
struct ast_channel *ochan = NULL;
int glaredetect = 0, res = 0;
Modified: team/ctooley/excel-sip-changes/channels/chan_mgcp.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/channels/chan_mgcp.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/channels/chan_mgcp.c (original)
+++ team/ctooley/excel-sip-changes/channels/chan_mgcp.c Thu May 22 12:14:00 2008
@@ -610,7 +610,7 @@
for(;;) {
if (sub->owner) {
if (!ast_channel_trylock(sub->owner)) {
- ast_queue_hangup(sub->owner, -1);
+ ast_queue_hangup(sub->owner);
ast_channel_unlock(sub->owner);
break;
} else {
Modified: team/ctooley/excel-sip-changes/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/channels/chan_misdn.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/channels/chan_misdn.c (original)
+++ team/ctooley/excel-sip-changes/channels/chan_misdn.c Thu May 22 12:14:00 2008
@@ -2320,13 +2320,13 @@
if (!p) {
ast_log(LOG_WARNING, " --> Channel not connected ??\n");
- ast_queue_hangup(ast, AST_CAUSE_NETWORK_OUT_OF_ORDER);
+ ast_queue_hangup_with_cause(ast, AST_CAUSE_NETWORK_OUT_OF_ORDER);
}
if (!p->bc) {
chan_misdn_log(1, 0, " --> Got Answer, but theres no bc obj ??\n");
- ast_queue_hangup(ast, AST_CAUSE_PROTOCOL_ERROR);
+ ast_queue_hangup_with_cause(ast, AST_CAUSE_PROTOCOL_ERROR);
}
tmp = pbx_builtin_getvar_helper(p->ast, "CRYPT_KEY");
@@ -2852,7 +2852,7 @@
tmp->frame.offset = 0;
tmp->frame.delivery = ast_tv(0,0);
tmp->frame.src = NULL;
- tmp->frame.data = tmp->ast_rd_buf;
+ tmp->frame.data.ptr = tmp->ast_rd_buf;
if (tmp->faxdetect && !tmp->faxhandled) {
if (tmp->faxdetect_timeout) {
@@ -2948,7 +2948,7 @@
ast_debug(1, "write2mISDN %p %d bytes: ", p, frame->samples);
for (i = 0; i < max ; i++)
- ast_debug(1, "%2.2x ", ((char*) frame->data)[i]);
+ ast_debug(1, "%2.2x ", ((char*) frame->data.ptr)[i]);
}
#endif
@@ -2973,14 +2973,14 @@
chan_misdn_log(9, ch->bc->port, "Sending :%d bytes 2 MISDN\n", frame->samples);
if ( !ch->bc->nojitter && misdn_cap_is_speech(ch->bc->capability) ) {
/* Buffered Transmit (triggert by read from isdn side)*/
- if (misdn_jb_fill(ch->jb, frame->data, frame->samples) < 0) {
+ if (misdn_jb_fill(ch->jb, frame->data.ptr, frame->samples) < 0) {
if (ch->bc->active)
cb_log(0, ch->bc->port, "Misdn Jitterbuffer Overflow.\n");
}
} else {
/*transmit without jitterbuffer*/
- i=misdn_lib_tx2misdn_frm(ch->bc, frame->data, frame->samples);
+ i=misdn_lib_tx2misdn_frm(ch->bc, frame->data.ptr, frame->samples);
}
return 0;
@@ -3120,7 +3120,7 @@
cl->notxtone = 0;
cl->norxtone = 0;
/* This prods us in misdn_write */
- ast_playtones_start(ast, 0, ts->data, 0);
+ ast_playtones_start(ast, 0, ts->data.ptr, 0);
}
return 0;
@@ -3665,7 +3665,7 @@
send_cause2ast(ch->ast, ch->bc, ch);
if (ch->ast)
- ast_queue_hangup(ch->ast, ch->bc->cause);
+ ast_queue_hangup_with_cause(ch->ast, ch->bc->cause);
cb_log(2, port, " --> queue_hangup\n");
} else {
cb_log(1, port, "Cannot hangup chan, no ast\n");
@@ -3801,7 +3801,7 @@
fr.frametype = AST_FRAME_DTMF;
fr.subclass = *predial;
fr.src = NULL;
- fr.data = NULL;
+ fr.data.ptr = NULL;
fr.datalen = 0;
fr.samples = 0;
fr.mallocd = 0;
@@ -4086,7 +4086,7 @@
fr.frametype = AST_FRAME_DTMF;
fr.subclass = bc->dtmf ;
fr.src = NULL;
- fr.data = NULL;
+ fr.data.ptr = NULL;
fr.datalen = 0;
fr.samples = 0;
fr.mallocd = 0;
@@ -4183,7 +4183,7 @@
fr.frametype = AST_FRAME_DTMF;
fr.subclass = bc->info_dad[0] ;
fr.src = NULL;
- fr.data = NULL;
+ fr.data.ptr = NULL;
fr.datalen = 0;
fr.samples = 0;
fr.mallocd = 0;
@@ -4756,7 +4756,7 @@
frame.offset = 0;
frame.delivery = ast_tv(0,0);
frame.src = NULL;
- frame.data = bc->bframe;
+ frame.data.ptr = bc->bframe;
if (ch->ast)
ast_queue_frame(ch->ast, &frame);
Modified: team/ctooley/excel-sip-changes/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/channels/chan_oss.c?view=diff&rev=117831&r1=117830&r2=117831
==============================================================================
--- team/ctooley/excel-sip-changes/channels/chan_oss.c (original)
+++ team/ctooley/excel-sip-changes/channels/chan_oss.c Thu May 22 12:14:00 2008
@@ -679,13 +679,13 @@
int l = sizeof(o->oss_write_buf) - o->oss_write_dst;
if (f->datalen - src >= l) { /* enough to fill a frame */
- memcpy(o->oss_write_buf + o->oss_write_dst, f->data + src, l);
+ memcpy(o->oss_write_buf + o->oss_write_dst, f->data.ptr + src, l);
soundcard_writeframe(o, (short *) o->oss_write_buf);
src += l;
o->oss_write_dst = 0;
} else { /* copy residue */
l = f->datalen - src;
[... 2091 lines stripped ...]
More information about the svn-commits
mailing list