[asterisk-commits] branch 1.2 - r7582
/branches/1.2/channels/chan_alsa.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Dec 21 14:01:17 CST 2005
Author: tilghman
Date: Wed Dec 21 14:01:16 2005
New Revision: 7582
URL: http://svn.digium.com/view/asterisk?rev=7582&view=rev
Log:
Allow a chan_alsa that failed to open sound devices to be unloaded.
Modified:
branches/1.2/channels/chan_alsa.c
Modified: branches/1.2/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_alsa.c?rev=7582&r1=7581&r2=7582&view=diff
==============================================================================
--- branches/1.2/channels/chan_alsa.c (original)
+++ branches/1.2/channels/chan_alsa.c Wed Dec 21 14:01:16 2005
@@ -1109,8 +1109,10 @@
ast_channel_unregister(&alsa_tech);
for (x=0;x<sizeof(myclis)/sizeof(struct ast_cli_entry); x++)
ast_cli_unregister(myclis + x);
- snd_pcm_close(alsa.icard);
- snd_pcm_close(alsa.ocard);
+ if (alsa.icard)
+ snd_pcm_close(alsa.icard);
+ if (alsa.ocard)
+ snd_pcm_close(alsa.ocard);
if (sndcmd[0] > 0) {
close(sndcmd[0]);
close(sndcmd[1]);
More information about the asterisk-commits
mailing list