diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-09 12:13:32 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-09 12:13:32 +0000 |
commit | 82a06bcfb7ca9bd14fec56d3d2a8cf54a54d871a (patch) | |
tree | 9e6d96810ce058026ab7c4a7d44a5b1e14f42e6b /channels/chan_oss.c | |
parent | 8d91c5d7d2f6a4f9b8e42a8650f800a7a31fe52d (diff) |
make get_video_desc() return the active console if
passed a null argument (channel).
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97389 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_oss.c')
-rw-r--r-- | channels/chan_oss.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_oss.c b/channels/chan_oss.c index 9bf749459..4f40085fa 100644 --- a/channels/chan_oss.c +++ b/channels/chan_oss.c @@ -307,10 +307,12 @@ struct chan_oss_pvt { /*! 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 @@ static struct chan_oss_pvt oss_default = { .boost = BOOST_SCALE, }; -static char *oss_active; /*!< the active device */ static int setformat(struct chan_oss_pvt *o, int mode); |