[sr-dev] git:master: mi_rpc: use autoconversion to string

Andrei Pelinescu-Onciul andrei at iptel.org
Wed Jul 15 22:58:36 CEST 2009


Module: sip-router
Branch: master
Commit: 47cca1121e45d6c99375cfe80b63cbf634e05bd0
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=47cca1121e45d6c99375cfe80b63cbf634e05bd0

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Wed Jul 15 22:55:28 2009 +0200

mi_rpc: use autoconversion to string

Because mi doesn't understand anything else besides strings, use
the new auto-convert modifier when reading the mi commands
parameters.

---

 modules/mi_rpc/mi_rpc_mod.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/mi_rpc/mi_rpc_mod.c b/modules/mi_rpc/mi_rpc_mod.c
index 007c575..9c68839 100644
--- a/modules/mi_rpc/mi_rpc_mod.c
+++ b/modules/mi_rpc/mi_rpc_mod.c
@@ -89,7 +89,7 @@ struct mi_root *mi_rpc_read_params(rpc_t *rpc, void *ctx)
 	}
 	node = &root->node;
 
-	while (rpc->scan(ctx, "*S", &value) == 1)
+	while (rpc->scan(ctx, "*.S", &value) == 1)
 	{
 		name.s   = 0;
 		name.len = 0;
@@ -104,7 +104,7 @@ struct mi_root *mi_rpc_read_params(rpc_t *rpc, void *ctx)
 			}
 
 			/* value */
-			if(rpc->scan(ctx, "*S", &value) != 1)
+			if(rpc->scan(ctx, "*.S", &value) != 1)
 			{
 				LM_ERR("value expected\n");
 				goto error;




More information about the sr-dev mailing list