Module: sip-router Branch: master Commit: 783f7987e01cdcaa680f4151f1661b6d5eee9004 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=783f7987...
Author: Peter Dunkley peter.dunkley@crocodile-rcs.com Committer: Peter Dunkley peter.dunkley@crocodile-rcs.com Date: Tue Apr 10 17:57:25 2012 +0100
modules_k/xcap_server: Added $xcapuri(u=>uri_adoc) pvar
- This gives access to the adoc field in the internal xuri data-structure (the xuri without xpath).
---
modules_k/xcap_server/README | 2 +- modules_k/xcap_server/doc/xcap_server_admin.xml | 2 +- modules_k/xcap_server/xcap_misc.c | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/modules_k/xcap_server/README b/modules_k/xcap_server/README index 17c7296..81f931f 100644 --- a/modules_k/xcap_server/README +++ b/modules_k/xcap_server/README @@ -264,7 +264,7 @@ event_route[xhttp:request] {
* $xcapuri(name=>key) - name can be any to idenitfy the XCAP uri; key can be: data, uri, root, auid, type, tree, xuid, file, node, - target, domain. + target, domain, uri_adoc.
Exported pseudo-variables are documented at http://www.kamailio.org/dokuwiki/. diff --git a/modules_k/xcap_server/doc/xcap_server_admin.xml b/modules_k/xcap_server/doc/xcap_server_admin.xml index ce02e29..60decd4 100644 --- a/modules_k/xcap_server/doc/xcap_server_admin.xml +++ b/modules_k/xcap_server/doc/xcap_server_admin.xml @@ -307,7 +307,7 @@ event_route[xhttp:request] { <listitem><para> <emphasis>$xcapuri(name=>key)</emphasis> - name can be any to idenitfy the XCAP uri; key can be: data, uri, root, auid, - type, tree, xuid, file, node, target, domain. + type, tree, xuid, file, node, target, domain, uri_adoc. </para></listitem> </itemizedlist> <para> diff --git a/modules_k/xcap_server/xcap_misc.c b/modules_k/xcap_server/xcap_misc.c index 0a0b559..146e941 100644 --- a/modules_k/xcap_server/xcap_misc.c +++ b/modules_k/xcap_server/xcap_misc.c @@ -814,6 +814,8 @@ int pv_parse_xcap_uri_name(pv_spec_p sp, str *in) pxs->ktype = 9; } else if(pxs->key.len==6 && strncmp(pxs->key.s, "domain", 6)==0) { pxs->ktype = 10; + } else if(pxs->key.len== 8 && strncmp(pxs->key.s, "uri_adoc", 8)==0) { + pxs->ktype = 11; } else { LM_ERR("unknown key type [%.*s]\n", in->len, in->s); goto error; @@ -917,6 +919,11 @@ int pv_get_xcap_uri(struct sip_msg *msg, pv_param_t *param, /* get domain */ if(pxs->xus->xuri.domain.len>0) return pv_get_strval(msg, param, res, &pxs->xus->xuri.domain); + case 11: + /* get xuri->adoc */ + if(pxs->xus->xuri.adoc.len>0) + return pv_get_strval(msg, param, res, &pxs->xus->xuri.adoc); + break; break; default: return pv_get_null(msg, param, res);