Module: sip-router
Branch: daniel/xavp
Commit: ef79b7beb75f3f4ed3a5fa1ba6c76363dc254e3e
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ef79b7b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Jun 30 12:26:56 2009 +0200
core: introducing xavp (eXtended AVP)
- design:
- one master list stored in core
- internal integer id to optimise the search in list (hash value over the string name)
- name stored as str and null terminated (can use regexp over it)
- string values stored as str and null terminated
- other types of value that can be used internally (not in config)
- long
- long long
- time
- xavp (or list of xavp)
- generic data structure
- for more see: http://sip-router.org/wiki/devel/xavp
- NOTE: this is not a replacement for existing AVPs, but an add-on, a new pseudo-variable class
---
xavp.c | 508 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
xavp.h | 95 ++++++++++++
2 files changed, 603 insertions(+), 0 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=ef7…
Module: sip-router
Branch: master
Commit: 21ba29a12f505b107ef4fb70d74bff6df02acc7b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=21ba29a…
Author: Michal Matyska <michal.matyska(a)iptel.org>
Committer: Michal Matyska <michal.matyska(a)iptel.org>
Date: Tue Jun 30 17:44:54 2009 +0200
select_core: fix @ruri.rn_user moving parsed ptr
- changed str* to str parameter type in search_param function to keep value
of the parameter intact upon function return, otherwise the function moved
the ptr to the beginning of the rn parameter or at the end of the pameters string.
---
select_core.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/select_core.c b/select_core.c
index 4cc32f1..3aece91 100644
--- a/select_core.c
+++ b/select_core.c
@@ -801,16 +801,16 @@ int select_uri_user(str* res, select_t* s, struct sip_msg* msg)
*
* val is set to the value of the parameter.
*/
-static inline int search_param(str *params, char *name, int name_len,
+static inline int search_param(str params, char *name, int name_len,
str *val)
{
param_hooks_t h;
param_t *p, *list;
- if (params->s == NULL)
+ if (params.s == NULL)
return 0;
- if (parse_params(params, CLASS_ANY, &h, &list) < 0)
+ if (parse_params(¶ms, CLASS_ANY, &h, &list) < 0)
return -1;
for (p = list; p; p=p->next) {
if ((p->name.len == name_len)
@@ -840,12 +840,12 @@ int select_uri_rn_user(str* res, select_t* s, struct sip_msg* msg)
}
/* search for the "rn" parameter */
- if ((ret = search_param(&select_uri_p->params, "rn", 2, &val)) != 0)
+ if ((ret = search_param(select_uri_p->params, "rn", 2, &val)) != 0)
goto done;
if (select_uri_p->sip_params.s != select_uri_p->params.s) {
/* check also the original sip: URI parameters */
- if ((ret = search_param(&select_uri_p->sip_params, "rn", 2, &val)) != 0)
+ if ((ret = search_param(select_uri_p->sip_params, "rn", 2, &val)) != 0)
goto done;
}
@@ -1015,7 +1015,7 @@ int select_any_params(str* res, select_t* s, struct sip_msg* msg)
if (!res->len) return -1;
- if (search_param(res, wanted->s, wanted->len, res) <= 0) {
+ if (search_param(*res, wanted->s, wanted->len, res) <= 0) {
DBG("SELECT ...uri.params.%s NOT FOUND !\n", wanted->s);
return -1;
} else {
Revision: 5886
http://openser.svn.sourceforge.net/openser/?rev=5886&view=rev
Author: henningw
Date: 2009-06-30 14:34:58 +0000 (Tue, 30 Jun 2009)
Log Message:
-----------
- update Changelogs
Modified Paths:
--------------
branches/1.3/ChangeLog
branches/1.4/ChangeLog
branches/1.5/ChangeLog
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.