mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
Allow a chan_alsa that failed to open sound devices to be unloaded.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@7582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1109,8 +1109,10 @@ int unload_module()
|
||||
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]);
|
||||
|
Reference in New Issue
Block a user