Module: sip-router
Branch: 4.1
Commit: 47a00936695c46176c3c047e0ab141b4127d08dc
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=47a0093…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun May 18 19:07:38 2014 +0200
mtree: replace tree structure even there are no records in db table
- reload didn't replaced old tree if no records in db table
- reported by Juha Heinanen
(cherry picked from commit c36f326d3c7372b149592d438df75f3d7b0a0233)
---
modules/mtree/mtree_mod.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/mtree/mtree_mod.c b/modules/mtree/mtree_mod.c
index 4e32dfa..96e6479 100644
--- a/modules/mtree/mtree_mod.c
+++ b/modules/mtree/mtree_mod.c
@@ -550,8 +550,7 @@ static int mt_load_db(m_tree_t *pt)
} else {
if(RES_ROW_N(db_res)==0)
{
- mt_dbf.free_result(db_con, db_res);
- return 0;
+ goto dbreloaded;
}
}
} else {
@@ -561,8 +560,7 @@ static int mt_load_db(m_tree_t *pt)
{
if(ret==0)
{
- mt_dbf.free_result(db_con, db_res);
- return 0;
+ goto dbreloaded;
} else {
goto error;
}
@@ -617,6 +615,8 @@ static int mt_load_db(m_tree_t *pt)
break;
}
} while(RES_ROW_N(db_res)>0);
+
+dbreloaded:
mt_dbf.free_result(db_con, db_res);