Module: sip-router Branch: master Commit: 6f38c000cc3b5c76c99904fa7d5ab244aaa774f4 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6f38c000...
Author: Andrei Pelinescu-Onciul andrei@iptel.org Committer: Andrei Pelinescu-Onciul andrei@iptel.org Date: Wed Jul 15 20:32:53 2009 +0200
xmlrpc(s): type autoconversion support
- added a new module parameter ("autoconversion") that when enabled will try to autoconvert the xmlrpc parameters types into what the rpc method expects (e.g. if the method expects a string, but receives an int, convert the int to string). By default it's off.
- support for a new modifier: '.' for rpc_scan. When used it turns auto-conversion on for the next input. E.g. rpc->scan(".s", &string) will work even if the next input is an int (it will convert it to string). More complex example: while((rpc->scan(c, "*.s", &p)>0)) rpc->add(c, "s", p); (work with any number of inputs/parameters, convert all of them to string and echo them back in the reply)
---
modules_s/xmlrpc/xmlrpc.c | 304 ++++++++++++++++++++++++++++++++++++++------- 1 files changed, 256 insertions(+), 48 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=6f38...