[asterisk-commits] rizzo: trunk r97389 - /trunk/channels/chan_oss.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 9 06:13:33 CST 2008


Author: rizzo
Date: Wed Jan  9 06:13:32 2008
New Revision: 97389

URL: http://svn.digium.com/view/asterisk?view=rev&rev=97389
Log:
make get_video_desc() return the active console if
passed a null argument (channel).


Modified:
    trunk/channels/chan_oss.c

Modified: trunk/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_oss.c?view=diff&rev=97389&r1=97388&r2=97389
==============================================================================
--- trunk/channels/chan_oss.c (original)
+++ trunk/channels/chan_oss.c Wed Jan  9 06:13:32 2008
@@ -307,10 +307,12 @@
 /*! forward declaration */
 static struct chan_oss_pvt *find_desc(char *dev);
 
+static char *oss_active;	 /*!< the active device */
+
 /*! \brief return the pointer to the video descriptor */
 struct video_desc *get_video_desc(struct ast_channel *c)
 {
-	struct chan_oss_pvt *o = c->tech_pvt;
+	struct chan_oss_pvt *o = c ? c->tech_pvt : find_desc(oss_active);
 	return o ? o->env : NULL;
 }
 static struct chan_oss_pvt oss_default = {
@@ -327,7 +329,6 @@
 	.boost = BOOST_SCALE,
 };
 
-static char *oss_active;	 /*!< the active device */
 
 static int setformat(struct chan_oss_pvt *o, int mode);
 




More information about the asterisk-commits mailing list