fix unloading problems (bug #4019)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5477 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2005-04-15 07:59:59 +00:00
parent e16718bb2e
commit e0aaf08b3b
2 changed files with 6 additions and 2 deletions

View File

@@ -20,6 +20,8 @@
-- chan_agent -- chan_agent
-- We now will not pass audio until the agent has acked the call if the configuration -- 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. is set up for the agent to do so.
-- chan_alsa
-- Fixed problems with the unloading of this module
-- res_agi -- res_agi
-- A fix has been added to prevent calls from being hung up when more than one -- 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. call is executing an AGI script calling the GET DATA command.

View File

@@ -1053,10 +1053,12 @@ int load_module()
int unload_module() int unload_module()
{ {
int x; int x;
ast_channel_unregister(type);
for (x=0;x<sizeof(myclis)/sizeof(struct ast_cli_entry); x++) for (x=0;x<sizeof(myclis)/sizeof(struct ast_cli_entry); x++)
ast_cli_unregister(myclis + x); ast_cli_unregister(myclis + x);
close(readdev); snd_pcm_close(alsa.icard);
close(writedev); snd_pcm_close(alsa.ocard);
if (sndcmd[0] > 0) { if (sndcmd[0] > 0) {
close(sndcmd[0]); close(sndcmd[0]);
close(sndcmd[1]); close(sndcmd[1]);