Module: sip-router Branch: master Commit: 4fd57899f54333e729c41fae9187142bf25a7fac URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4fd57899...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Sun May 3 13:42:56 2009 +0200
pv: avp_aliases parameter
- avp_aliases parameter from K core - pv module is the only one exporting $avp(...) PV, so without it this parameter makes no sense
---
modules_k/pv/pv.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/modules_k/pv/pv.c b/modules_k/pv/pv.c index 9d7078a..596b618 100644 --- a/modules_k/pv/pv.c +++ b/modules_k/pv/pv.c @@ -359,9 +359,12 @@ static pv_export_t mod_pvs[] = { { {0, 0}, 0, 0, 0, 0, 0, 0, 0 } };
+static int add_avp_aliases(modparam_t type, void* val); + static param_export_t params[]={ {"shvset", STR_PARAM|USE_FUNC_PARAM, (void*)param_set_shvar }, {"varset", STR_PARAM|USE_FUNC_PARAM, (void*)param_set_var }, + {"avp_aliases", STR_PARAM|USE_FUNC_PARAM, (void*)add_avp_aliases }, {0,0,0} };
@@ -455,3 +458,14 @@ static int pv_unset(struct sip_msg* msg, char* pvid, char *foo) return 1; }
+static int add_avp_aliases(modparam_t type, void* val) +{ + if (val!=0 && ((char*)val)[0]!=0) + { + if ( add_avp_galias_str((char*)val)!=0 ) + return -1; + } + + return 0; +} +