]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 298392 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 16 Dec 2010 00:29:10 +0000 (00:29 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 16 Dec 2010 00:29:10 +0000 (00:29 +0000)
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

index 98b6b7c4c9c0b51abdd74a0624b8304cdc2058ea..dabdfb336ef76c7b7e07360406f3648a11217411 100644 (file)
@@ -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;
 }