[sr-dev] git:master:c7b5ce5f: doc/select_list: makefile - generate html with full section numbers

2017-06-04 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: c7b5ce5f32663938665c56151f69ea067c1787ea
URL: 
https://github.com/kamailio/kamailio/commit/c7b5ce5f32663938665c56151f69ea067c1787ea

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2017-06-04T16:28:18+02:00

doc/select_list: makefile - generate html with full section numbers

---

Modified: doc/tutorials/select_list/docbook/Makefile

---

Diff:  
https://github.com/kamailio/kamailio/commit/c7b5ce5f32663938665c56151f69ea067c1787ea.diff
Patch: 
https://github.com/kamailio/kamailio/commit/c7b5ce5f32663938665c56151f69ea067c1787ea.patch

---

diff --git a/doc/tutorials/select_list/docbook/Makefile 
b/doc/tutorials/select_list/docbook/Makefile
index 827b10cc04..c53be7add1 100644
--- a/doc/tutorials/select_list/docbook/Makefile
+++ b/doc/tutorials/select_list/docbook/Makefile
@@ -2,6 +2,14 @@
 docs = select_list.xml
 docbook_dir = ../../../docbook
 # no subsection listed in the main TOC
-xsltproc_flags+=--stringparam  toc.section.depth 0
+xsltproc_flags+= --stringparam toc.section.depth 0
+xsltproc_flags+= --stringparam section.autolabel 1
+xsltproc_flags+= --stringparam section.label.includes.component.label 1
 
 include $(docbook_dir)/Makefile
+
+# updates to the html generated file
+.PHONY: html-update
+html-update:
+   # strip first to lines (xml and doctype constraints)
+   sed -i '1,2d' $(basename $(docs)).html


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:a80e3421: doc/counter_list: makefile - generate html with full section numbers

2017-06-04 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: a80e3421dda08c00935bbac08e5b589175c51f5d
URL: 
https://github.com/kamailio/kamailio/commit/a80e3421dda08c00935bbac08e5b589175c51f5d

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2017-06-04T16:28:18+02:00

doc/counter_list: makefile - generate html with full section numbers

---

Modified: doc/tutorials/counter_list/docbook/Makefile

---

Diff:  
https://github.com/kamailio/kamailio/commit/a80e3421dda08c00935bbac08e5b589175c51f5d.diff
Patch: 
https://github.com/kamailio/kamailio/commit/a80e3421dda08c00935bbac08e5b589175c51f5d.patch

---

diff --git a/doc/tutorials/counter_list/docbook/Makefile 
b/doc/tutorials/counter_list/docbook/Makefile
index 1bf8952d99..c4eefe3071 100644
--- a/doc/tutorials/counter_list/docbook/Makefile
+++ b/doc/tutorials/counter_list/docbook/Makefile
@@ -2,6 +2,14 @@
 docs = counter_list.xml
 docbook_dir = ../../../docbook
 # no subsection listed in the main TOC
-xsltproc_flags+=--stringparam  toc.section.depth 0
+xsltproc_flags+= --stringparam toc.section.depth 0
+xsltproc_flags+= --stringparam section.autolabel 1
+xsltproc_flags+= --stringparam section.label.includes.component.label 1
 
 include $(docbook_dir)/Makefile
+
+# updates to the html generated file
+.PHONY: html-update
+html-update:
+   # strip first to lines (xml and doctype constraints)
+   sed -i '1,2d' $(basename $(docs)).html


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] Failed: kamailio/kamailio#4387 (4.4 - f0da142)

2017-06-04 Thread Travis CI
Build Update for kamailio/kamailio
-

Build: #4387
Status: Failed

Duration: 7 minutes and 13 seconds
Commit: f0da142 (4.4)
Author: Victor Seva
Message: travis-ci: use 4.4-jessie image

View the changeset: 
https://github.com/kamailio/kamailio/compare/b7bd4beabe76...f0da1424678d

View the full build log and details: 
https://travis-ci.org/kamailio/kamailio/builds/239279831?utm_source=email_medium=notification

--

You can configure recipients for build notifications in your .travis.yml file. 
See https://docs.travis-ci.com/user/notifications

___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:4.4:f0da1424: travis-ci: use 4.4-jessie image

2017-06-04 Thread Victor Seva
Module: kamailio
Branch: 4.4
Commit: f0da1424678d0f2d64fa9b2abfab538f1c2736cf
URL: 
https://github.com/kamailio/kamailio/commit/f0da1424678d0f2d64fa9b2abfab538f1c2736cf

Author: Victor Seva 
Committer: Victor Seva 
Date: 2017-06-04T13:13:25+02:00

travis-ci: use 4.4-jessie image

---

Modified: .travis.yml

---

Diff:  
https://github.com/kamailio/kamailio/commit/f0da1424678d0f2d64fa9b2abfab538f1c2736cf.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f0da1424678d0f2d64fa9b2abfab538f1c2736cf.patch

---

diff --git a/.travis.yml b/.travis.yml
index 3d5e58bb2b..130dcd8aa4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,8 +6,8 @@ compiler:
 services:
   - docker
 before_install:
-  - docker pull kamailio/pkg-kamailio-docker:4.4-stretch
-script: docker run -v $TRAVIS_BUILD_DIR:/code:rw 
kamailio/pkg-kamailio-docker:5.0-stretch /bin/bash -c "export CC=$CC; cd /code; 
./test/travis/build_travis.sh"
+  - docker pull kamailio/pkg-kamailio-docker:4.4-jessie
+script: docker run -v $TRAVIS_BUILD_DIR:/code:rw 
kamailio/pkg-kamailio-docker:4.4-jessie /bin/bash -c "export CC=$CC; cd /code; 
./test/travis/build_travis.sh"
 branches:
   only:
 - '/^4\.[0-9]+$/'


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] Errored: kamailio/kamailio#4384 (4.4 - b7bd4be)

2017-06-04 Thread Travis CI
Build Update for kamailio/kamailio
-

Build: #4384
Status: Errored

Duration: 44 seconds
Commit: b7bd4be (4.4)
Author: Victor Seva
Message: pv: fix pv_var_to_xavp() and pv_xavp_to_var() functions

* xavp was not properly created at pv_var_to_xavp()
* add proper xavp loop for pv_xavp_to_var()

View the changeset: 
https://github.com/kamailio/kamailio/compare/b4cb65354de5...b7bd4beabe76

View the full build log and details: 
https://travis-ci.org/kamailio/kamailio/builds/239279302?utm_source=email_medium=notification

--

You can configure recipients for build notifications in your .travis.yml file. 
See https://docs.travis-ci.com/user/notifications

___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:5.0:6171c150: pv: fix pv_var_to_xavp() and pv_xavp_to_var() functions

2017-06-04 Thread Victor Seva
Module: kamailio
Branch: 5.0
Commit: 6171c15069576c0686827d594d512170f187dd6c
URL: 
https://github.com/kamailio/kamailio/commit/6171c15069576c0686827d594d512170f187dd6c

Author: Victor Seva 
Committer: Victor Seva 
Date: 2017-06-04T13:09:05+02:00

pv: fix pv_var_to_xavp() and pv_xavp_to_var() functions

* xavp was not properly created at pv_var_to_xavp()
* add proper xavp loop for pv_xavp_to_var()

(cherry picked from commit 894d13f226310a6fcf78d0abbb4ea6e5eae903fd)

---

Modified: src/modules/pv/pv_xavp.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/6171c15069576c0686827d594d512170f187dd6c.diff
Patch: 
https://github.com/kamailio/kamailio/commit/6171c15069576c0686827d594d512170f187dd6c.patch

---

diff --git a/src/modules/pv/pv_xavp.c b/src/modules/pv/pv_xavp.c
index e95d48d3e1..d556dda99f 100644
--- a/src/modules/pv/pv_xavp.c
+++ b/src/modules/pv/pv_xavp.c
@@ -622,7 +622,7 @@ int xavp_params_explode(str *params, str *xname)
 int pv_var_to_xavp(str *varname, str *xname)
 {
script_var_t *it;
-   sr_xavp_t *xavp = NULL;
+   sr_xavp_t *avp = NULL;
sr_xval_t xval;
 
LM_DBG("xname:%.*s varname:%.*s\n", xname->len, xname->s,
@@ -638,18 +638,29 @@ int pv_var_to_xavp(str *varname, str *xname)
{
xval.type = SR_XTYPE_INT;
xval.v.i = it->v.value.n;
+   LM_DBG("[%.*s]: %d\n", it->name.len, 
it->name.s, xval.v.i);
} else {
if(it->v.value.s.len==0) continue;
xval.type = SR_XTYPE_STR;
xval.v.s.s = it->v.value.s.s;
xval.v.s.len = it->v.value.s.len;
+   LM_DBG("[%.*s]: '%.*s'\n", it->name.len, 
it->name.s,
+   xval.v.s.len, xval.v.s.s);
}
-   xavp = xavp_add_xavp_value(xname, >name, , 
NULL);
-   if(xavp==NULL) {
+   if(xavp_add_value(>name, , )==NULL) {
LM_ERR("can't copy [%.*s]\n", it->name.len, 
it->name.s);
goto error;
}
}
+   if(avp) {
+   memset(, 0, sizeof(sr_xval_t));
+   xval.type = SR_XTYPE_XAVP;
+   xval.v.xavp = avp;
+   if(xavp_add_value(xname, , NULL)==NULL) {
+   LM_ERR("Can't create xavp[%.*s]\n", xname->len, 
xname->s);
+   goto error;
+   }
+   }
}
else {
it = get_var_by_name(varname);
@@ -662,21 +673,23 @@ int pv_var_to_xavp(str *varname, str *xname)
{
xval.type = SR_XTYPE_INT;
xval.v.i = it->v.value.n;
+   LM_DBG("[%.*s]: %d\n", it->name.len, it->name.s, 
xval.v.i);
} else {
xval.type = SR_XTYPE_STR;
xval.v.s.s = it->v.value.s.s;
xval.v.s.len = it->v.value.s.len;
+   LM_DBG("[%.*s]: '%.*s'\n", it->name.len, it->name.s,
+   xval.v.s.len, xval.v.s.s);
}
-   xavp = xavp_add_xavp_value(xname, >name, , NULL);
-   if(xavp==NULL) {
+   if(xavp_add_xavp_value(xname, >name, , NULL)==NULL) {
LM_ERR("can't copy [%.*s]\n", it->name.len, it->name.s);
-   goto error;
+   return -1;
}
}
return 1;
 
 error:
-   xavp_rm_by_name(xname, 1, NULL);
+   if(avp) xavp_destroy_list();
return -1;
 }
 
@@ -691,7 +704,7 @@ int pv_xavp_to_var_helper(sr_xavp_t *avp) {
flags |= VAR_VAL_STR;
value.s.len = avp->val.v.s.len;
value.s.s = avp->val.v.s.s;
-   LM_DBG("var:[%.*s]  STR:[%.*s]\n", avp->name.len, avp->name.s,
+   LM_DBG("var:[%.*s] STR:[%.*s]\n", avp->name.len, avp->name.s,
value.s.len, value.s.s);
}
else if(avp->val.type==SR_XTYPE_INT) {
@@ -723,18 +736,21 @@ int pv_xavp_to_var(str *xname) {
LM_ERR("%.*s not xavp type?\n", xname->len, xname->s);
return -1;
}
-   avp = xavp->val.v.xavp;
-   if (avp)
-   {
-   if(pv_xavp_to_var_helper(avp)<0) return -1;
-   avp = avp->next;
-   }
+   do {
+   avp = xavp->val.v.xavp;
+   if (avp)
+   {
+   if(pv_xavp_to_var_helper(avp)<0) return -1;
+   avp = avp->next;
+   }
 
-   while(avp)
-  

[sr-dev] git:master:66873cbe: pv: fix pv_var_to_xavp() and pv_xavp_to_var() functions

2017-06-04 Thread Victor Seva
Module: kamailio
Branch: master
Commit: 66873cbec5249a21c048349f608e316febd1b313
URL: 
https://github.com/kamailio/kamailio/commit/66873cbec5249a21c048349f608e316febd1b313

Author: Victor Seva 
Committer: Victor Seva 
Date: 2017-06-04T13:09:12+02:00

pv: fix pv_var_to_xavp() and pv_xavp_to_var() functions

* xavp was not properly created at pv_var_to_xavp()
* add proper xavp loop for pv_xavp_to_var()

---

Modified: src/modules/pv/pv_xavp.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/66873cbec5249a21c048349f608e316febd1b313.diff
Patch: 
https://github.com/kamailio/kamailio/commit/66873cbec5249a21c048349f608e316febd1b313.patch

---

diff --git a/src/modules/pv/pv_xavp.c b/src/modules/pv/pv_xavp.c
index e95d48d3e1..d556dda99f 100644
--- a/src/modules/pv/pv_xavp.c
+++ b/src/modules/pv/pv_xavp.c
@@ -622,7 +622,7 @@ int xavp_params_explode(str *params, str *xname)
 int pv_var_to_xavp(str *varname, str *xname)
 {
script_var_t *it;
-   sr_xavp_t *xavp = NULL;
+   sr_xavp_t *avp = NULL;
sr_xval_t xval;
 
LM_DBG("xname:%.*s varname:%.*s\n", xname->len, xname->s,
@@ -638,18 +638,29 @@ int pv_var_to_xavp(str *varname, str *xname)
{
xval.type = SR_XTYPE_INT;
xval.v.i = it->v.value.n;
+   LM_DBG("[%.*s]: %d\n", it->name.len, 
it->name.s, xval.v.i);
} else {
if(it->v.value.s.len==0) continue;
xval.type = SR_XTYPE_STR;
xval.v.s.s = it->v.value.s.s;
xval.v.s.len = it->v.value.s.len;
+   LM_DBG("[%.*s]: '%.*s'\n", it->name.len, 
it->name.s,
+   xval.v.s.len, xval.v.s.s);
}
-   xavp = xavp_add_xavp_value(xname, >name, , 
NULL);
-   if(xavp==NULL) {
+   if(xavp_add_value(>name, , )==NULL) {
LM_ERR("can't copy [%.*s]\n", it->name.len, 
it->name.s);
goto error;
}
}
+   if(avp) {
+   memset(, 0, sizeof(sr_xval_t));
+   xval.type = SR_XTYPE_XAVP;
+   xval.v.xavp = avp;
+   if(xavp_add_value(xname, , NULL)==NULL) {
+   LM_ERR("Can't create xavp[%.*s]\n", xname->len, 
xname->s);
+   goto error;
+   }
+   }
}
else {
it = get_var_by_name(varname);
@@ -662,21 +673,23 @@ int pv_var_to_xavp(str *varname, str *xname)
{
xval.type = SR_XTYPE_INT;
xval.v.i = it->v.value.n;
+   LM_DBG("[%.*s]: %d\n", it->name.len, it->name.s, 
xval.v.i);
} else {
xval.type = SR_XTYPE_STR;
xval.v.s.s = it->v.value.s.s;
xval.v.s.len = it->v.value.s.len;
+   LM_DBG("[%.*s]: '%.*s'\n", it->name.len, it->name.s,
+   xval.v.s.len, xval.v.s.s);
}
-   xavp = xavp_add_xavp_value(xname, >name, , NULL);
-   if(xavp==NULL) {
+   if(xavp_add_xavp_value(xname, >name, , NULL)==NULL) {
LM_ERR("can't copy [%.*s]\n", it->name.len, it->name.s);
-   goto error;
+   return -1;
}
}
return 1;
 
 error:
-   xavp_rm_by_name(xname, 1, NULL);
+   if(avp) xavp_destroy_list();
return -1;
 }
 
@@ -691,7 +704,7 @@ int pv_xavp_to_var_helper(sr_xavp_t *avp) {
flags |= VAR_VAL_STR;
value.s.len = avp->val.v.s.len;
value.s.s = avp->val.v.s.s;
-   LM_DBG("var:[%.*s]  STR:[%.*s]\n", avp->name.len, avp->name.s,
+   LM_DBG("var:[%.*s] STR:[%.*s]\n", avp->name.len, avp->name.s,
value.s.len, value.s.s);
}
else if(avp->val.type==SR_XTYPE_INT) {
@@ -723,18 +736,21 @@ int pv_xavp_to_var(str *xname) {
LM_ERR("%.*s not xavp type?\n", xname->len, xname->s);
return -1;
}
-   avp = xavp->val.v.xavp;
-   if (avp)
-   {
-   if(pv_xavp_to_var_helper(avp)<0) return -1;
-   avp = avp->next;
-   }
+   do {
+   avp = xavp->val.v.xavp;
+   if (avp)
+   {
+   if(pv_xavp_to_var_helper(avp)<0) return -1;
+   avp = avp->next;
+   }
 
-   while(avp)
-   {
-   if(pv_xavp_to_var_helper(avp)<0) return -1;

[sr-dev] git:4.4:b7bd4bea: pv: fix pv_var_to_xavp() and pv_xavp_to_var() functions

2017-06-04 Thread Victor Seva
Module: kamailio
Branch: 4.4
Commit: b7bd4beabe76b01342afb4eb84ea4a4a68863efe
URL: 
https://github.com/kamailio/kamailio/commit/b7bd4beabe76b01342afb4eb84ea4a4a68863efe

Author: Victor Seva 
Committer: Victor Seva 
Date: 2017-06-04T13:08:53+02:00

pv: fix pv_var_to_xavp() and pv_xavp_to_var() functions

* xavp was not properly created at pv_var_to_xavp()
* add proper xavp loop for pv_xavp_to_var()

---

Modified: modules/pv/pv_xavp.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/b7bd4beabe76b01342afb4eb84ea4a4a68863efe.diff
Patch: 
https://github.com/kamailio/kamailio/commit/b7bd4beabe76b01342afb4eb84ea4a4a68863efe.patch

---

diff --git a/modules/pv/pv_xavp.c b/modules/pv/pv_xavp.c
index 28bb06ed26..d6fd83d954 100644
--- a/modules/pv/pv_xavp.c
+++ b/modules/pv/pv_xavp.c
@@ -622,7 +622,7 @@ int xavp_params_explode(str *params, str *xname)
 int pv_var_to_xavp(str *varname, str *xname)
 {
script_var_t *it;
-   sr_xavp_t *xavp = NULL;
+   sr_xavp_t *avp = NULL;
sr_xval_t xval;
 
LM_DBG("xname:%.*s varname:%.*s\n", xname->len, xname->s,
@@ -638,18 +638,29 @@ int pv_var_to_xavp(str *varname, str *xname)
{
xval.type = SR_XTYPE_INT;
xval.v.i = it->v.value.n;
+   LM_DBG("[%.*s]: %d\n", it->name.len, 
it->name.s, xval.v.i);
} else {
if(it->v.value.s.len==0) continue;
xval.type = SR_XTYPE_STR;
xval.v.s.s = it->v.value.s.s;
xval.v.s.len = it->v.value.s.len;
+   LM_DBG("[%.*s]: '%.*s'\n", it->name.len, 
it->name.s,
+   xval.v.s.len, xval.v.s.s);
}
-   xavp = xavp_add_xavp_value(xname, >name, , 
NULL);
-   if(xavp==NULL) {
+   if(xavp_add_value(>name, , )==NULL) {
LM_ERR("can't copy [%.*s]\n", it->name.len, 
it->name.s);
goto error;
}
}
+   if(avp) {
+   memset(, 0, sizeof(sr_xval_t));
+   xval.type = SR_XTYPE_XAVP;
+   xval.v.xavp = avp;
+   if(xavp_add_value(xname, , NULL)==NULL) {
+   LM_ERR("Can't create xavp[%.*s]\n", xname->len, 
xname->s);
+   goto error;
+   }
+   }
}
else {
it = get_var_by_name(varname);
@@ -662,21 +673,23 @@ int pv_var_to_xavp(str *varname, str *xname)
{
xval.type = SR_XTYPE_INT;
xval.v.i = it->v.value.n;
+   LM_DBG("[%.*s]: %d\n", it->name.len, it->name.s, 
xval.v.i);
} else {
xval.type = SR_XTYPE_STR;
xval.v.s.s = it->v.value.s.s;
xval.v.s.len = it->v.value.s.len;
+   LM_DBG("[%.*s]: '%.*s'\n", it->name.len, it->name.s,
+   xval.v.s.len, xval.v.s.s);
}
-   xavp = xavp_add_xavp_value(xname, >name, , NULL);
-   if(xavp==NULL) {
+   if(xavp_add_xavp_value(xname, >name, , NULL)==NULL) {
LM_ERR("can't copy [%.*s]\n", it->name.len, it->name.s);
-   goto error;
+   return -1;
}
}
return 1;
 
 error:
-   xavp_rm_by_name(xname, 1, NULL);
+   if(avp) xavp_destroy_list();
return -1;
 }
 
@@ -691,7 +704,7 @@ int pv_xavp_to_var_helper(sr_xavp_t *avp) {
flags |= VAR_VAL_STR;
value.s.len = avp->val.v.s.len;
value.s.s = avp->val.v.s.s;
-   LM_DBG("var:[%.*s]  STR:[%.*s]\n", avp->name.len, avp->name.s,
+   LM_DBG("var:[%.*s] STR:[%.*s]\n", avp->name.len, avp->name.s,
value.s.len, value.s.s);
}
else if(avp->val.type==SR_XTYPE_INT) {
@@ -723,18 +736,21 @@ int pv_xavp_to_var(str *xname) {
LM_ERR("%.*s not xavp type?\n", xname->len, xname->s);
return -1;
}
-   avp = xavp->val.v.xavp;
-   if (avp)
-   {
-   if(pv_xavp_to_var_helper(avp)<0) return -1;
-   avp = avp->next;
-   }
+   do {
+   avp = xavp->val.v.xavp;
+   if (avp)
+   {
+   if(pv_xavp_to_var_helper(avp)<0) return -1;
+   avp = avp->next;
+   }
 
-   while(avp)
-   {
-   if(pv_xavp_to_var_helper(avp)<0) return -1;
-   avp =