Fixed chan_alsa.c unload bug (bug #4019)
authorMatthew Fredrickson <creslin@digium.com>
Wed, 13 Apr 2005 16:24:45 +0000 (16:24 +0000)
committerMatthew Fredrickson <creslin@digium.com>
Wed, 13 Apr 2005 16:24:45 +0000 (16:24 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5464 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_alsa.c

index d035b69..cde0e9e 100755 (executable)
@@ -1077,8 +1077,8 @@ 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);
-       close(readdev);
-       close(writedev);
+       snd_pcm_close(alsa.icard);
+       snd_pcm_close(alsa.ocard);
        if (sndcmd[0] > 0) {
                close(sndcmd[0]);
                close(sndcmd[1]);