[svn-commits] russell: trunk r245382 - /trunk/channels/chan_usbradio.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Feb 7 22:31:05 CST 2010


Author: russell
Date: Sun Feb  7 22:31:03 2010
New Revision: 245382

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=245382
Log:
Make chan_usbradio compile.

Modified:
    trunk/channels/chan_usbradio.c

Modified: trunk/channels/chan_usbradio.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_usbradio.c?view=diff&rev=245382&r1=245381&r2=245382
==============================================================================
--- trunk/channels/chan_usbradio.c (original)
+++ trunk/channels/chan_usbradio.c Sun Feb  7 22:31:03 2010
@@ -659,9 +659,9 @@
 
 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 @@
 	{
 		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 @@
 		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 @@
 	    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_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 @@
 		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) {




More information about the svn-commits mailing list