]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix unloading problems (bug #4019)
authorRussell Bryant <russell@russellbryant.com>
Fri, 15 Apr 2005 07:59:59 +0000 (07:59 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 15 Apr 2005 07:59:59 +0000 (07:59 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5477 65c4cc65-6c06-0410-ace0-fbb531ad65f3

CHANGES
channels/chan_alsa.c

diff --git a/CHANGES b/CHANGES
index dedf3d8a566f0d98357448d9445935a1b5668a2f..858c648ad7e452354d861639d6b1ed1c0bebea85 100755 (executable)
--- a/CHANGES
+++ b/CHANGES
@@ -20,6 +20,8 @@
  -- chan_agent
     -- We now will not pass audio until the agent has acked the call if the configuration
        is set up for the agent to do so.
+ -- chan_alsa
+    -- Fixed problems with the unloading of this module
  -- res_agi
     -- A fix has been added to prevent calls from being hung up when more than one
        call is executing an AGI script calling the GET DATA command.
index 49030d1c5c67731b86247694cc65b36c5e239344..3da955a6bb9434b60c68bba64901ee37ab29b8ac 100755 (executable)
@@ -1053,10 +1053,12 @@ int load_module()
 int unload_module()
 {
        int x;
+       
+       ast_channel_unregister(type);
        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]);