From 1dec2275aab6246872c5ce3022c7486a28368ef1 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Thu, 16 Dec 2010 00:29:10 +0000 Subject: [PATCH] Merged revisions 298392 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r298392 | tilghman | 2010-12-15 18:28:04 -0600 (Wed, 15 Dec 2010) | 8 lines 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.6.2@298393 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- cdr/cdr_sqlite.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cdr/cdr_sqlite.c b/cdr/cdr_sqlite.c index 98b6b7c4c9..dabdfb336e 100644 --- a/cdr/cdr_sqlite.c +++ b/cdr/cdr_sqlite.c @@ -163,9 +163,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; } -- 2.47.2