Unregister before shutting down the connection, to avoid a race.

(closes issue #18481)
 Reported by: pabelanger
 Patches: 
       20101215__issue18481.diff.txt uploaded by tilghman (license 14)
 Tested by: pabelanger


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@298392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2010-12-16 00:28:04 +00:00
parent d644f402d0
commit d8f9e4b1d8

View File

@@ -167,9 +167,10 @@ static int sqlite_log(struct ast_cdr *cdr)
static int unload_module(void)
{
if (db)
sqlite_close(db);
ast_cdr_unregister(name);
if (db) {
sqlite_close(db);
}
return 0;
}