summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2010-02-08 04:31:03 +0000
committerRussell Bryant <russell@russellbryant.com>2010-02-08 04:31:03 +0000
commit96f382fb60bbd746cdd87c542474346c5b26f912 (patch)
treef8b5ced7b031b6f19f40ab635e4389763e1cdf6d /channels
parentfe19e1fbd327ba0e69e4d205dc6870c6b920b000 (diff)
Make chan_usbradio compile.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@245382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_usbradio.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/channels/chan_usbradio.c b/channels/chan_usbradio.c
index 088855702..af6db7e48 100644
--- a/channels/chan_usbradio.c
+++ b/channels/chan_usbradio.c
@@ -659,9 +659,9 @@ static char *usbradio_active; /* the active device */
static int setformat(struct chan_usbradio_pvt *o, int mode);
-static struct ast_channel *usbradio_request(const char *type, int format,
- const struct ast_channel *requestor,
- void *data, int *cause);
+static struct ast_channel *usbradio_request(const char *type, format_t format,
+ const struct ast_channel *requestor,
+ void *data, int *cause);
static int usbradio_digit_begin(struct ast_channel *c, char digit);
static int usbradio_digit_end(struct ast_channel *c, char digit, unsigned int duration);
static int usbradio_text(struct ast_channel *c, const char *text);
@@ -2052,14 +2052,14 @@ static struct ast_frame *usbradio_read(struct ast_channel *c)
{
o->lastrx = 0;
//printf("AST_CONTROL_RADIO_UNKEY\n");
- wf.subclass = AST_CONTROL_RADIO_UNKEY;
+ wf.subclass.integer = AST_CONTROL_RADIO_UNKEY;
ast_queue_frame(o->owner, &wf);
}
else if ((!o->lastrx) && (o->rxkeyed))
{
o->lastrx = 1;
//printf("AST_CONTROL_RADIO_KEY\n");
- wf.subclass = AST_CONTROL_RADIO_KEY;
+ wf.subclass.integer = AST_CONTROL_RADIO_KEY;
if(o->rxctcssdecode)
{
wf.data.ptr = o->rxctcssfreq;
@@ -2074,7 +2074,7 @@ static struct ast_frame *usbradio_read(struct ast_channel *c)
return f;
/* ok we can build and deliver the frame to the caller */
f->frametype = AST_FRAME_VOICE;
- f->subclass = AST_FORMAT_SLINEAR;
+ f->subclass.codec = AST_FORMAT_SLINEAR;
f->samples = FRAME_SIZE;
f->datalen = FRAME_SIZE * 2;
f->data.ptr = o->usbradio_read_buf_8k + AST_FRIENDLY_OFFSET;
@@ -2098,14 +2098,14 @@ static struct ast_frame *usbradio_read(struct ast_channel *c)
if ((f1->frametype == AST_FRAME_DTMF_END) ||
(f1->frametype == AST_FRAME_DTMF_BEGIN))
{
- if ((f1->subclass == 'm') || (f1->subclass == 'u'))
+ if ((f1->subclass.integer == 'm') || (f1->subclass.integer == 'u'))
{
f1->frametype = AST_FRAME_NULL;
- f1->subclass = 0;
+ f1->subclass.integer = 0;
return(f1);
}
if (f1->frametype == AST_FRAME_DTMF_END)
- ast_log(LOG_NOTICE,"Got DTMF char %c\n",f1->subclass);
+ ast_log(LOG_NOTICE, "Got DTMF char %c\n", f1->subclass.integer);
return(f1);
}
}
@@ -2223,7 +2223,7 @@ static struct ast_channel *usbradio_new(struct chan_usbradio_pvt *o, char *ext,
}
/*
*/
-static struct ast_channel *usbradio_request(const char *type, int format, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *usbradio_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause)
{
struct ast_channel *c;
struct chan_usbradio_pvt *o = find_desc(data);
@@ -2240,7 +2240,7 @@ static struct ast_channel *usbradio_request(const char *type, int format, const
return NULL;
}
if ((format & AST_FORMAT_SLINEAR) == 0) {
- ast_log(LOG_NOTICE, "Format 0x%x unsupported\n", format);
+ ast_log(LOG_NOTICE, "Format 0x%lx unsupported\n", format);
return NULL;
}
if (o->owner) {