Module: sip-router
Branch: sr_3.0
Commit: d4d88bef1cb8887d0e267be79d02625d2ac1f143
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d4d88be…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Fri Mar 5 16:54:58 2010 +0200
modules_k/permisssions Fixed a bug that caused a segmentation fault if the mi_fifo
subnet_dump was issued
but the permissions module was not fully configured (no db url given)
(cherry picked from commit d5da961b7ac62037fb1fb24c6ce3484584f5f972)
---
modules_k/permissions/mi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules_k/permissions/mi.c b/modules_k/permissions/mi.c
index 9b4594a..c2f900f 100644
--- a/modules_k/permissions/mi.c
+++ b/modules_k/permissions/mi.c
@@ -116,7 +116,7 @@ struct mi_root* mi_subnet_dump(struct mi_root *cmd_tree, void *param)
rpl_tree = init_mi_tree( 200, MI_SSTR(MI_OK));
if (rpl_tree==NULL) return 0;
- if(subnet_table_mi_print(*subnet_table, &rpl_tree->node) < 0) {
+ if(subnet_table && subnet_table_mi_print(*subnet_table,
&rpl_tree->node) < 0) {
LM_ERR("failed to add a node\n");
free_mi_tree(rpl_tree);
return 0;