Module: sip-router Branch: master Commit: e4fc24fe3c350a231cf00b74c05c3c05c2a1e289 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e4fc24fe...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Mon Jun 22 11:17:58 2009 +0200
kex: fix in mi debug command with no parameter
- reported by Juha Heinanen
---
modules_k/kex/mi_core.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules_k/kex/mi_core.c b/modules_k/kex/mi_core.c index 369fe59..9714d1f 100644 --- a/modules_k/kex/mi_core.c +++ b/modules_k/kex/mi_core.c @@ -320,7 +320,7 @@ static struct mi_root *mi_debug(struct mi_root *cmd, void *param) int new_debug = 0; str group_name = {"core", 4}; str var_name = {"debug", 5}; - void *vval; + void *vval = 0; int set = 0; unsigned int val_type;
@@ -333,7 +333,7 @@ static struct mi_root *mi_debug(struct mi_root *cmd, void *param) if(cfg_get_by_name(_kex_cfg_ctx, &group_name, &var_name, &vval, &val_type)!=0) return init_mi_tree( 500, MI_SSTR(MI_INTERNAL_ERR)); - new_debug = *((int*)vval); + new_debug = (int)(long)vval; } rpl_tree = init_mi_tree( 200, MI_SSTR(MI_OK)); if (rpl_tree==0)