Re: [sr-dev] [kamailio/kamailio] http_async_client: memory mismanagement (#1407)

2018-01-23 Thread Federico Cabiddu
set_quey_params is called in mod_init by init_query_params 
(https://github.com/kamailio/kamailio/blob/master/src/modules/http_async_client/async_http.c#L631),
 so whenever ah_set_req is called the query_params struct should already have 
been initialized.

headers.t is a double pointer, the allocated memory is freed later by 
free_async_query, we are not freeing it inset_query_params. If we don't set it 
to NULL we end up with a growing headers list (from different request) and we 
go toward a crash being the memory freed elsewhere.

This being said, do you have a coredump of the crashes? Which OS/libcurl 
version are you using? Recently a crash at startup had been reported which was 
due to a combination of libcurl/OS libs: 
https://github.com/kamailio/kamailio/issues/1391.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1407#issuecomment-360041430___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] presence: dmq integration (#1402)

2018-01-23 Thread Charles Chance
@charlesrchance pushed 3 commits.

c21cae5  schema: add ruid column to presentity table
0c2a427  kamctl: regenerated db scripts to include presentity ruid column
e60c4a8  presence: added enable_dmq parameter to module docs


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/kamailio/kamailio/pull/1402/files/d6f618e35940263dc992e1b9e61b4be19528a08a..e60c4a823c26bc4f1268613c8666260693d458fe
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] http_async_client: memory mismanagement (#1407)

2018-01-23 Thread Dragos Oancea
@grumvalski , set_query_params() is called in 3 places, for us kamailio is 
crashing at startup, and I suspect  header_list_add(_params.headers, 
>rs); is sometimes called before set_query_params(_params) in 
ah_set_req() , thus leading to a kamailio crash at startup, under traffic. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1407#issuecomment-359874351___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] presence: dmq integration (#1402)

2018-01-23 Thread Charles Chance
Thanks!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1402#issuecomment-359867760___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:43434ee8: modules: readme files regenerated - cfg_rpc ... [skip ci]

2018-01-23 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: 43434ee8a1d65276dfbfce2f866f91d4bf0682fc
URL: 
https://github.com/kamailio/kamailio/commit/43434ee8a1d65276dfbfce2f866f91d4bf0682fc

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2018-01-23T17:46:38+01:00

modules: readme files regenerated - cfg_rpc ... [skip ci]

---

Modified: src/modules/cfg_rpc/README

---

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

---

diff --git a/src/modules/cfg_rpc/README b/src/modules/cfg_rpc/README
index 93d31e0a0c..9f3c25820a 100644
--- a/src/modules/cfg_rpc/README
+++ b/src/modules/cfg_rpc/README
@@ -147,12 +147,15 @@ Chapter 1. Admin Guide
 3.2. cfg.get
 
cfg.get - Get the value of a configuration variable. The function
-   accepts two parameters: group name, variable name. The group name can
-   optionally contain the group instance id, for example foo[5].
+   accepts two parameters: group name, variable name, but if all the
+   elements belonging to a certain group is wanted to be retrieved then
+   only the group name would suffice as the function parameter. The group
+   name can optionally contain the group instance id, for example foo[5].
 
Example 1.2. Use cfg.get RPC command
 ...
 # kamcmd cfg.get core debug
+# kamcmd cfg.get tm
 ...
 
 3.3. cfg.seti


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


Re: [sr-dev] [kamailio/kamailio] cfg_rpc: extending the functionality of cfg.get command (#1321)

2018-01-23 Thread Daniel-Constantin Mierla
The issue with `n = rpc->scan(c, "S*S", , );` was due to a bug in 
`ctl` module, using `kamcmd` revealed that. Using `kamctl` with `jsonrpcs` 
module was not affected. The bug is fixed now in master and it will be 
backported.

Besides using the `*` specifier for optional params, your patch in this PR was 
adjusted so that the `cfg.get` for a group returns a structure with field names 
and values. All are in master now.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1321#issuecomment-359851175___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] cfg_rpc: extending the functionality of cfg.get command (#1321)

2018-01-23 Thread Daniel-Constantin Mierla
Closed #1321.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1321#event-1437725237___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:a9972863: ctl: proper handling of optional param specifier (*) in rpc scan

2018-01-23 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: a9972863681059c647af4bafd0d9a20f7648c801
URL: 
https://github.com/kamailio/kamailio/commit/a9972863681059c647af4bafd0d9a20f7648c801

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-01-23T17:33:39+01:00

ctl: proper handling of optional param specifier (*) in rpc scan

---

Modified: src/modules/ctl/binrpc_run.c

---

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

---

diff --git a/src/modules/ctl/binrpc_run.c b/src/modules/ctl/binrpc_run.c
index 74d71dc8f9..efff292081 100644
--- a/src/modules/ctl/binrpc_run.c
+++ b/src/modules/ctl/binrpc_run.c
@@ -841,11 +841,11 @@ static int rpc_scan(struct binrpc_ctx* ctx, char* fmt, 
...)
/* clear the previously saved error code */
rpc_fault_reset(ctx);
 
-   va_start(ap, fmt);
orig_fmt=fmt;
nofault = 0;
modifiers=0;
autoconv=autoconvert;
+   va_start(ap, fmt);
for (;*fmt; fmt++){
switch(*fmt){
case '*': /* start of optional parameters */
@@ -918,7 +918,7 @@ static int rpc_scan(struct binrpc_ctx* ctx, char* fmt, ...)
 error_read:
/* Do not immediately send out the error message, the user might retry 
the scan with
different parameters */
-   if(nofault==0 || ((err!=E_BINRPC_MORE_DATA) && (err!=E_BINRPC_EOP)))
+   if(nofault==0 || ((err!=E_BINRPC_MORE_DATA) && (err!=E_BINRPC_EOP))) {
rpc_fault_prepare(ctx, 400, "error at parameter %d: expected %s 
type but"
" %s", ctx->in.record_no, 
rpc_type_name(v.type),
 binrpc_error(err));
@@ -927,6 +927,11 @@ static int rpc_scan(struct binrpc_ctx* ctx, char* fmt, ...)
": %s", ctx->in.record_no, 
ctx->in.ctx.offset,
v.type, 
binrpc_error(err));
*/
+   }
+   if(nofault==1 && (err==E_BINRPC_MORE_DATA || err==E_BINRPC_EOP)) {
+   va_end(ap);
+   return (int)(fmt-orig_fmt)-modifiers;
+   }
goto error_ret;
 error_not_supported:
rpc_fault(ctx, 500, "internal server error, type %d not supported",


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


[sr-dev] git:master:95e82d91: cfg_rcp: allow getting 0 values in rpc cfg.get

2018-01-23 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 95e82d9135180be519192029d3f6edcf56eddb59
URL: 
https://github.com/kamailio/kamailio/commit/95e82d9135180be519192029d3f6edcf56eddb59

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-01-23T17:32:23+01:00

cfg_rcp: allow getting 0 values in rpc cfg.get

- issue introduced in previous commit
- log message for dynamic values to be skipped

---

Modified: src/modules/cfg_rpc/cfg_rpc.c

---

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

---

diff --git a/src/modules/cfg_rpc/cfg_rpc.c b/src/modules/cfg_rpc/cfg_rpc.c
index a2d44e3acc..d865eae561 100644
--- a/src/modules/cfg_rpc/cfg_rpc.c
+++ b/src/modules/cfg_rpc/cfg_rpc.c
@@ -381,18 +381,20 @@ static void rpc_get(rpc_t* rpc, void* c)
for (i=0; def[i].name; i++) {
var.s = def[i].name;
var.len = (int)strlen(def[i].name);
-   LM_DBG("getting value for variable: 
%.*s.%.*s\n", group.len, group.s,
-   var.len, var.s);
+   LM_DBG("getting value for variable: 
%.*s.%.*s\n",
+   group.len, group.s, 
var.len, var.s);
val = NULL;
ret = cfg_get_by_name(ctx, , 
group_id, ,
, _type);
if (ret < 0) {
rpc->fault(c, 400, "Failed to 
get the variable");
return;
-   } else if (ret > 0 || val==NULL) {
+   } else if (ret > 0) {
+   LM_DBG("skipping dynamic 
(callback) value for variable:"
+   " %.*s.%.*s 
(%p/%d)\n",
+   group.len, 
group.s, var.len, var.s, val, ret);
continue;
}
-   LM_DBG("type: %d value: %p\n", 
val_type, val);
switch (val_type) {
case CFG_VAR_INT:
rpc->struct_add(rh, 
"d", var.s, (int)(long)val);


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


[sr-dev] git:master:4920d1c5: cfg_rpc: rpc command cfg.get accepts group name to list its vars

2018-01-23 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 4920d1c5df277526dcb27d34bfedab4cc2815bde
URL: 
https://github.com/kamailio/kamailio/commit/4920d1c5df277526dcb27d34bfedab4cc2815bde

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-01-23T16:56:51+01:00

cfg_rpc: rpc command cfg.get accepts group name to list its vars

- if only one parameter is given (group name), cfg.get returns a
structure with all variables and their values in the group
- patched enhaced from the PR #1321 by Huseyin Dikme 

---

Modified: src/modules/cfg_rpc/cfg_rpc.c

---

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

---

diff --git a/src/modules/cfg_rpc/cfg_rpc.c b/src/modules/cfg_rpc/cfg_rpc.c
index f62855b092..a2d44e3acc 100644
--- a/src/modules/cfg_rpc/cfg_rpc.c
+++ b/src/modules/cfg_rpc/cfg_rpc.c
@@ -310,48 +310,113 @@ static const char* rpc_get_doc[2] = {
 
 static void rpc_get(rpc_t* rpc, void* c)
 {
-   str group, var;
-   void*val;
-   unsigned intval_type;
-   int ret;
-   unsigned int*group_id;
+   str group, var;
+   void*val;
+   unsigned intval_type;
+   int ret, n;
+   unsigned int*group_id;
+   void *rh = NULL;
 
-   if (rpc->scan(c, "SS", , ) < 2)
+   n = rpc->scan(c, "S*S", , );
+   /*  2: both group and variable name are present
+* -1: only group is present, print all variables in the group */
+   if(n<1) {
+   rpc->fault(c, 500, "Failed to get the parameters");
return;
-
+   }
+   if (n == 1) {
+   var.s = NULL;
+   var.len = 0;
+   }
if (get_group_id(, _id)) {
rpc->fault(c, 400, "Wrong group syntax. Use either \"group\", 
or \"group[id]\"");
return;
}
+   if(var.len != 0) {
+   LM_DBG("getting value for variable: %.*s.%.*s\n", group.len, 
group.s,
+   var.len, var.s);
+   /* print value for one variable */
+   val = NULL;
+   ret = cfg_get_by_name(ctx, , group_id, ,
+   , _type);
+   if (ret < 0) {
+   rpc->fault(c, 400, "Failed to get the variable");
+   return;
+   } else if (ret > 0) {
+   rpc->fault(c, 400, "Variable exists, but it is not 
readable via RPC interface");
+   return;
+   }
+   switch (val_type) {
+   case CFG_VAR_INT:
+   rpc->add(c, "d", (int)(long)val);
+   break;
+   case CFG_VAR_STRING:
+   rpc->add(c, "s", (char *)val);
+   break;
+   case CFG_VAR_STR:
+   rpc->add(c, "S", (str *)val);
+   break;
+   case CFG_VAR_POINTER:
+   rpc->rpl_printf(c, "%p", val);
+   break;
+   }
+   } else {
+   /* print values for all variables in the group */
+   void*h;
+   str gname;
+   cfg_def_t   *def;
+   int i;
+   char pbuf[32];
+   int plen;
+   LM_DBG("getting values for group: %.*s\n", group.len, group.s);
+   rpc->add(c, "{", );
+   if(rh==NULL) {
+   LM_ERR("failed to add root structure\n");
+   rpc->fault(c, 500, "Failed to add root structure");
+   return;
+   }
+   cfg_get_group_init();
+   while(cfg_get_group_next(, , )) {
+   if (((gname.len == group.len) && (memcmp(gname.s, 
group.s, group.len) == 0))) {
+   for (i=0; def[i].name; i++) {
+   var.s = def[i].name;
+   var.len = (int)strlen(def[i].name);
+   LM_DBG("getting value for variable: 
%.*s.%.*s\n", group.len, group.s,
+   var.len, var.s);
+   val = NULL;
+   ret = cfg_get_by_name(ctx, , 
group_id, ,
+   , _type);
+   if (ret < 0) {
+   rpc->fault(c, 400, "Failed to 
get the variable");
+   return;
+   } else 

[sr-dev] git:master:e98bd848: cfg_rpc: documentation about group vars listing with rpc cfg.get

2018-01-23 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: e98bd84810b8faa7faf7af3384fc2c979725fe86
URL: 
https://github.com/kamailio/kamailio/commit/e98bd84810b8faa7faf7af3384fc2c979725fe86

Author: Huseyin Dikme 
Committer: Daniel-Constantin Mierla 
Date: 2018-01-23T16:59:25+01:00

cfg_rpc: documentation about group vars listing with rpc cfg.get

- part of PR #1321

---

Modified: src/modules/cfg_rpc/doc/rpc.xml

---

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

---

diff --git a/src/modules/cfg_rpc/doc/rpc.xml b/src/modules/cfg_rpc/doc/rpc.xml
index 9298247d83..9e4f2003eb 100644
--- a/src/modules/cfg_rpc/doc/rpc.xml
+++ b/src/modules/cfg_rpc/doc/rpc.xml
@@ -35,7 +35,8 @@

cfg.get - Get the value of
a configuration variable. The function accepts two parameters:
-   group name, variable name. The group name can optionally 
contain the
+   group name, variable name, but if all the elements belonging to 
a certain group is wanted to be retrieved
+   then only the group name would suffice as the function 
parameter. The group name can optionally contain the
group instance id, for example foo[5].


@@ -43,6 +44,7 @@

 ...
 #  cfg.get core debug
+#  cfg.get tm
 ...
 



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


[sr-dev] [kamailio/kamailio] http_async_client: memory mismanagement (#1407)

2018-01-23 Thread Dragos Oancea


 Pre-Submission Checklist



- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, 
...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook 
files
in `doc/` subfolder, the README file is autogenerated)

 Type Of Change
- [ X] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)

 Checklist:

- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #1208 

 Description
p->headers.t is dynamically allocated header_list_add() in and should be freed 
with free_async_query(). 

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/1407

-- Commit Summary --

  * http_async_client: memory mismanagement

-- File Changes --

M src/modules/http_async_client/async_http.c (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/1407.patch
https://github.com/kamailio/kamailio/pull/1407.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1407
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] presence: dmq integration (#1402)

2018-01-23 Thread Daniel-Constantin Mierla
For changes to db schema, you have to update the xml files from 
`src/lib/srdb1/schema/`.

The you can run `make dbschema` in the root folder of kamailio source code tree 
and the sql/db scripts for `kamdbctl` will be updated (they have to be 
committed, too).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1402#issuecomment-359839409___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] presence: dmq integration (#1402)

2018-01-23 Thread Charles Chance
Thanks - I planned to document the parameter prior to merging.

The DB schema definition for presently table needs updating too - where should 
this be done?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1402#issuecomment-359827835___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] json: add transformation (#1404)

2018-01-23 Thread Emmanuel Schmidbauer
transformation is not the same -- it is entirely changed to not conflict with 
`kazoo` or `nsq`
example transformations:
 -  json module: `$(rb{json.parse,Event-Package}`
 - nsq module: `$(rb{nsq.json,Event-Package}`
 - kazoo module: `$(rb{kz.json,Event-Package}`


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1404#issuecomment-359818905___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] presence: dmq integration (#1402)

2018-01-23 Thread Daniel-Constantin Mierla
I think the new parameter is not documented, can be done in a follow up commit.

If there are no other comments from devs, then it can be merged.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1402#issuecomment-359818191___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] json: add transformation (#1404)

2018-01-23 Thread Daniel-Constantin Mierla
Is the name of the transformation the same across these modules? If yes, that 
creates a conflict if all modules are going to be loaded -- I understand you 
are going to remove from nsq, but there is also in kazoo.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1404#issuecomment-359817058___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [SR-Users] Fosdem dinner

2018-01-23 Thread Giovanni Maruzzelli
Hi,

please count me too :)

-giovanni


On 22 January 2018 at 11:13, Alexandr Dubovikov <
alexandr.dubovi...@gmail.com> wrote:

> Hi,
>
> count on me as well +2
>
> Wbr,
> Alexandr
>
> On 17 January 2018 at 00:34, Julien Chavanton 
> wrote:
>
>> Hi Daniel, I will be happy to join !
>>
>> On Mon, Jan 15, 2018 at 12:28 AM, Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> in the past 10 years or so, many of us met at Fosdem conference in
>>> Brussels (the edition this year happens during February 3-4) and had a
>>> dinner on Saturday evening. I know already couple of people from
>>> community that will go there, so the question is if there is any
>>> interest to organize again such event.
>>>
>>> If yes, it will be again on Saturday, on the evening of the 3rd of
>>> February.
>>>
>>> At the past editions, it turned into an all-RTC dinner, but we can
>>> consider to have it alone again (eventually with few other invited
>>> friends), if there are too many or people want a smaller meeting.
>>>
>>> Reply this week if you want to join, so we can estimate how many seats
>>> we need and have enough time to find a place that can accommodate us.
>>>
>>> More about Fosdem can be found at:
>>>
>>>   - https://fosdem.org
>>>
>>> There is a devroom on Sunday with topics covering real time
>>> communications. I will have a presentation there.
>>>
>>> Cheers,
>>> Daniel
>>>
>>> --
>>> Daniel-Constantin Mierla
>>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>>> Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
>>> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
>>>
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-us...@lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>
>>
>> ___
>> Kamailio (SER) - Development Mailing List
>> sr-dev@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
>>
>>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-us...@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>


-- 

Sincerely,

Giovanni Maruzzelli
OpenTelecom.IT
cell: +39 347 266 56 18
___
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:d99e2f81: kazoo: change string parameters to PARAM_STR

2018-01-23 Thread Luis Azedo
Module: kamailio
Branch: 5.0
Commit: d99e2f8118dca4cd55a3e4138809cebeb8cdb139
URL: 
https://github.com/kamailio/kamailio/commit/d99e2f8118dca4cd55a3e4138809cebeb8cdb139

Author: lazedo 
Committer: Luis Azedo 
Date: 2018-01-23T10:24:17Z

kazoo: change string parameters to PARAM_STR

(cherry picked from commit 3018595d13dde08d15e8063cecb42a01ea271b66)

---

Modified: src/modules/kazoo/kazoo.c

---

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

---

diff --git a/src/modules/kazoo/kazoo.c b/src/modules/kazoo/kazoo.c
index 40535aa82b..ca7bdfe000 100644
--- a/src/modules/kazoo/kazoo.c
+++ b/src/modules/kazoo/kazoo.c
@@ -159,8 +159,8 @@ static cmd_export_t cmds[] = {
 };
 
 static param_export_t params[] = {
-{"node_hostname", STR_PARAM, _node_hostname.s},
-{"amqp_connection", 
STR_PARAM|USE_FUNC_PARAM,(void*)kz_amqp_add_connection},
+{"node_hostname", PARAM_STR, _node_hostname},
+{"amqp_connection", 
PARAM_STRING|USE_FUNC_PARAM,(void*)kz_amqp_add_connection},
 {"amqp_max_channels", INT_PARAM, _channels},
 {"amqp_timmer_process_interval", INT_PARAM, _timer_ms},
 {"amqp_consumer_ack_timeout_micro", INT_PARAM, _ack_tv.tv_usec},
@@ -171,31 +171,31 @@ static param_export_t params[] = {
 {"amqp_waitframe_timeout_sec", INT_PARAM, _amqp_tv.tv_sec},
 {"amqp_consumer_processes", INT_PARAM, _consumer_processes},
 {"amqp_consumer_workers", INT_PARAM, _consumer_workers},
-{"amqp_consumer_event_key", STR_PARAM, _consumer_event_key.s},
-{"amqp_consumer_event_subkey", STR_PARAM, _consumer_event_subkey.s},
+{"amqp_consumer_event_key", PARAM_STR, _consumer_event_key},
+{"amqp_consumer_event_subkey", PARAM_STR, _consumer_event_subkey},
 {"amqp_query_timeout_micro", INT_PARAM, _qtimeout_tv.tv_usec},
 {"amqp_query_timeout_sec", INT_PARAM, _qtimeout_tv.tv_sec},
 {"amqp_internal_loop_count", INT_PARAM, _internal_loop_count},
 {"amqp_consumer_loop_count", INT_PARAM, _consumer_loop_count},
 {"amqp_consumer_ack_loop_count", INT_PARAM, _consumer_ack_loop_count},
 {"pua_include_entity", INT_PARAM, _include_entity},
-{"presentity_table", STR_PARAM, _presentity_table.s},
-   {"db_url", STR_PARAM, _db_url.s},
+{"presentity_table", PARAM_STR, _presentity_table},
+   {"db_url", PARAM_STR, _db_url},
 {"pua_mode", INT_PARAM, _pua_mode},
 {"single_consumer_on_reconnect", INT_PARAM, 
_single_consumer_on_reconnect},
 {"consume_messages_on_reconnect", INT_PARAM, 
_consume_messages_on_reconnect},
-{"amqp_query_timeout_avp", STR_PARAM, _query_timeout_avp.s},
-{"json_escape_char", STR_PARAM, _json_escape_str.s},
-{"app_name", STR_PARAM, _app_name.s},
+{"amqp_query_timeout_avp", PARAM_STR, _query_timeout_avp},
+{"json_escape_char", PARAM_STR, _json_escape_str},
+{"app_name", PARAM_STR, _app_name},
 {"use_federated_exchange", INT_PARAM, _use_federated_exchange},
-{"federated_exchange", STR_PARAM, _federated_exchange.s},
+{"federated_exchange", PARAM_STR, _federated_exchange},
 {"amqp_heartbeats", INT_PARAM, _use_hearbeats},
-{"amqp_primary_zone", STR_PARAM, _primary_zone_name.s},
+{"amqp_primary_zone", PARAM_STR, _primary_zone_name},
 {"amqp_command_hashtable_size", INT_PARAM, _command_table_size},
-{"amqp_result_avp", STR_PARAM, _query_result_avp.s},
-{"amqps_ca_cert", STR_PARAM, _amqps_ca_cert.s},
-{"amqps_cert", STR_PARAM, _amqps_cert.s},
-{"amqps_key", STR_PARAM, _amqps_key.s},
+{"amqp_result_avp", PARAM_STR, _query_result_avp},
+{"amqps_ca_cert", PARAM_STR, _amqps_ca_cert},
+{"amqps_cert", PARAM_STR, _amqps_cert},
+{"amqps_key", PARAM_STR, _amqps_key},
 {"amqps_verify_peer", INT_PARAM, _amqps_verify_peer},
 {"amqps_verify_hostname", INT_PARAM, _amqps_verify_hostname},
{"pua_lock_type", INT_PARAM, _pua_lock_type},
@@ -255,11 +255,6 @@ static int mod_init(void) {
LM_ERR("You must set the node_hostname parameter\n");
return -1;
 }
-dbk_node_hostname.len = strlen(dbk_node_hostname.s);
-
-dbk_consumer_event_key.len = strlen(dbk_consumer_event_key.s);
-   dbk_consumer_event_subkey.len = strlen(dbk_consumer_event_subkey.s);
-
 
if(kz_init_avp()) {
LM_ERR("Error in avp params\n");


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


[sr-dev] git:5.1:47821c58: kazoo: change string parameters to PARAM_STR

2018-01-23 Thread Luis Azedo
Module: kamailio
Branch: 5.1
Commit: 47821c5871d188ac04b6e366717a314a8d710699
URL: 
https://github.com/kamailio/kamailio/commit/47821c5871d188ac04b6e366717a314a8d710699

Author: lazedo 
Committer: Luis Azedo 
Date: 2018-01-23T10:24:53Z

kazoo: change string parameters to PARAM_STR

(cherry picked from commit 3018595d13dde08d15e8063cecb42a01ea271b66)

---

Modified: src/modules/kazoo/kazoo.c

---

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

---

diff --git a/src/modules/kazoo/kazoo.c b/src/modules/kazoo/kazoo.c
index 40535aa82b..ca7bdfe000 100644
--- a/src/modules/kazoo/kazoo.c
+++ b/src/modules/kazoo/kazoo.c
@@ -159,8 +159,8 @@ static cmd_export_t cmds[] = {
 };
 
 static param_export_t params[] = {
-{"node_hostname", STR_PARAM, _node_hostname.s},
-{"amqp_connection", 
STR_PARAM|USE_FUNC_PARAM,(void*)kz_amqp_add_connection},
+{"node_hostname", PARAM_STR, _node_hostname},
+{"amqp_connection", 
PARAM_STRING|USE_FUNC_PARAM,(void*)kz_amqp_add_connection},
 {"amqp_max_channels", INT_PARAM, _channels},
 {"amqp_timmer_process_interval", INT_PARAM, _timer_ms},
 {"amqp_consumer_ack_timeout_micro", INT_PARAM, _ack_tv.tv_usec},
@@ -171,31 +171,31 @@ static param_export_t params[] = {
 {"amqp_waitframe_timeout_sec", INT_PARAM, _amqp_tv.tv_sec},
 {"amqp_consumer_processes", INT_PARAM, _consumer_processes},
 {"amqp_consumer_workers", INT_PARAM, _consumer_workers},
-{"amqp_consumer_event_key", STR_PARAM, _consumer_event_key.s},
-{"amqp_consumer_event_subkey", STR_PARAM, _consumer_event_subkey.s},
+{"amqp_consumer_event_key", PARAM_STR, _consumer_event_key},
+{"amqp_consumer_event_subkey", PARAM_STR, _consumer_event_subkey},
 {"amqp_query_timeout_micro", INT_PARAM, _qtimeout_tv.tv_usec},
 {"amqp_query_timeout_sec", INT_PARAM, _qtimeout_tv.tv_sec},
 {"amqp_internal_loop_count", INT_PARAM, _internal_loop_count},
 {"amqp_consumer_loop_count", INT_PARAM, _consumer_loop_count},
 {"amqp_consumer_ack_loop_count", INT_PARAM, _consumer_ack_loop_count},
 {"pua_include_entity", INT_PARAM, _include_entity},
-{"presentity_table", STR_PARAM, _presentity_table.s},
-   {"db_url", STR_PARAM, _db_url.s},
+{"presentity_table", PARAM_STR, _presentity_table},
+   {"db_url", PARAM_STR, _db_url},
 {"pua_mode", INT_PARAM, _pua_mode},
 {"single_consumer_on_reconnect", INT_PARAM, 
_single_consumer_on_reconnect},
 {"consume_messages_on_reconnect", INT_PARAM, 
_consume_messages_on_reconnect},
-{"amqp_query_timeout_avp", STR_PARAM, _query_timeout_avp.s},
-{"json_escape_char", STR_PARAM, _json_escape_str.s},
-{"app_name", STR_PARAM, _app_name.s},
+{"amqp_query_timeout_avp", PARAM_STR, _query_timeout_avp},
+{"json_escape_char", PARAM_STR, _json_escape_str},
+{"app_name", PARAM_STR, _app_name},
 {"use_federated_exchange", INT_PARAM, _use_federated_exchange},
-{"federated_exchange", STR_PARAM, _federated_exchange.s},
+{"federated_exchange", PARAM_STR, _federated_exchange},
 {"amqp_heartbeats", INT_PARAM, _use_hearbeats},
-{"amqp_primary_zone", STR_PARAM, _primary_zone_name.s},
+{"amqp_primary_zone", PARAM_STR, _primary_zone_name},
 {"amqp_command_hashtable_size", INT_PARAM, _command_table_size},
-{"amqp_result_avp", STR_PARAM, _query_result_avp.s},
-{"amqps_ca_cert", STR_PARAM, _amqps_ca_cert.s},
-{"amqps_cert", STR_PARAM, _amqps_cert.s},
-{"amqps_key", STR_PARAM, _amqps_key.s},
+{"amqp_result_avp", PARAM_STR, _query_result_avp},
+{"amqps_ca_cert", PARAM_STR, _amqps_ca_cert},
+{"amqps_cert", PARAM_STR, _amqps_cert},
+{"amqps_key", PARAM_STR, _amqps_key},
 {"amqps_verify_peer", INT_PARAM, _amqps_verify_peer},
 {"amqps_verify_hostname", INT_PARAM, _amqps_verify_hostname},
{"pua_lock_type", INT_PARAM, _pua_lock_type},
@@ -255,11 +255,6 @@ static int mod_init(void) {
LM_ERR("You must set the node_hostname parameter\n");
return -1;
 }
-dbk_node_hostname.len = strlen(dbk_node_hostname.s);
-
-dbk_consumer_event_key.len = strlen(dbk_consumer_event_key.s);
-   dbk_consumer_event_subkey.len = strlen(dbk_consumer_event_subkey.s);
-
 
if(kz_init_avp()) {
LM_ERR("Error in avp params\n");


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


[sr-dev] git:master:3018595d: kazoo: change string parameters to PARAM_STR

2018-01-23 Thread lazedo
Module: kamailio
Branch: master
Commit: 3018595d13dde08d15e8063cecb42a01ea271b66
URL: 
https://github.com/kamailio/kamailio/commit/3018595d13dde08d15e8063cecb42a01ea271b66

Author: lazedo 
Committer: lazedo 
Date: 2018-01-23T10:20:52Z

kazoo: change string parameters to PARAM_STR

---

Modified: src/modules/kazoo/kazoo.c

---

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

---

diff --git a/src/modules/kazoo/kazoo.c b/src/modules/kazoo/kazoo.c
index 40535aa82b..ca7bdfe000 100644
--- a/src/modules/kazoo/kazoo.c
+++ b/src/modules/kazoo/kazoo.c
@@ -159,8 +159,8 @@ static cmd_export_t cmds[] = {
 };
 
 static param_export_t params[] = {
-{"node_hostname", STR_PARAM, _node_hostname.s},
-{"amqp_connection", 
STR_PARAM|USE_FUNC_PARAM,(void*)kz_amqp_add_connection},
+{"node_hostname", PARAM_STR, _node_hostname},
+{"amqp_connection", 
PARAM_STRING|USE_FUNC_PARAM,(void*)kz_amqp_add_connection},
 {"amqp_max_channels", INT_PARAM, _channels},
 {"amqp_timmer_process_interval", INT_PARAM, _timer_ms},
 {"amqp_consumer_ack_timeout_micro", INT_PARAM, _ack_tv.tv_usec},
@@ -171,31 +171,31 @@ static param_export_t params[] = {
 {"amqp_waitframe_timeout_sec", INT_PARAM, _amqp_tv.tv_sec},
 {"amqp_consumer_processes", INT_PARAM, _consumer_processes},
 {"amqp_consumer_workers", INT_PARAM, _consumer_workers},
-{"amqp_consumer_event_key", STR_PARAM, _consumer_event_key.s},
-{"amqp_consumer_event_subkey", STR_PARAM, _consumer_event_subkey.s},
+{"amqp_consumer_event_key", PARAM_STR, _consumer_event_key},
+{"amqp_consumer_event_subkey", PARAM_STR, _consumer_event_subkey},
 {"amqp_query_timeout_micro", INT_PARAM, _qtimeout_tv.tv_usec},
 {"amqp_query_timeout_sec", INT_PARAM, _qtimeout_tv.tv_sec},
 {"amqp_internal_loop_count", INT_PARAM, _internal_loop_count},
 {"amqp_consumer_loop_count", INT_PARAM, _consumer_loop_count},
 {"amqp_consumer_ack_loop_count", INT_PARAM, _consumer_ack_loop_count},
 {"pua_include_entity", INT_PARAM, _include_entity},
-{"presentity_table", STR_PARAM, _presentity_table.s},
-   {"db_url", STR_PARAM, _db_url.s},
+{"presentity_table", PARAM_STR, _presentity_table},
+   {"db_url", PARAM_STR, _db_url},
 {"pua_mode", INT_PARAM, _pua_mode},
 {"single_consumer_on_reconnect", INT_PARAM, 
_single_consumer_on_reconnect},
 {"consume_messages_on_reconnect", INT_PARAM, 
_consume_messages_on_reconnect},
-{"amqp_query_timeout_avp", STR_PARAM, _query_timeout_avp.s},
-{"json_escape_char", STR_PARAM, _json_escape_str.s},
-{"app_name", STR_PARAM, _app_name.s},
+{"amqp_query_timeout_avp", PARAM_STR, _query_timeout_avp},
+{"json_escape_char", PARAM_STR, _json_escape_str},
+{"app_name", PARAM_STR, _app_name},
 {"use_federated_exchange", INT_PARAM, _use_federated_exchange},
-{"federated_exchange", STR_PARAM, _federated_exchange.s},
+{"federated_exchange", PARAM_STR, _federated_exchange},
 {"amqp_heartbeats", INT_PARAM, _use_hearbeats},
-{"amqp_primary_zone", STR_PARAM, _primary_zone_name.s},
+{"amqp_primary_zone", PARAM_STR, _primary_zone_name},
 {"amqp_command_hashtable_size", INT_PARAM, _command_table_size},
-{"amqp_result_avp", STR_PARAM, _query_result_avp.s},
-{"amqps_ca_cert", STR_PARAM, _amqps_ca_cert.s},
-{"amqps_cert", STR_PARAM, _amqps_cert.s},
-{"amqps_key", STR_PARAM, _amqps_key.s},
+{"amqp_result_avp", PARAM_STR, _query_result_avp},
+{"amqps_ca_cert", PARAM_STR, _amqps_ca_cert},
+{"amqps_cert", PARAM_STR, _amqps_cert},
+{"amqps_key", PARAM_STR, _amqps_key},
 {"amqps_verify_peer", INT_PARAM, _amqps_verify_peer},
 {"amqps_verify_hostname", INT_PARAM, _amqps_verify_hostname},
{"pua_lock_type", INT_PARAM, _pua_lock_type},
@@ -255,11 +255,6 @@ static int mod_init(void) {
LM_ERR("You must set the node_hostname parameter\n");
return -1;
 }
-dbk_node_hostname.len = strlen(dbk_node_hostname.s);
-
-dbk_consumer_event_key.len = strlen(dbk_consumer_event_key.s);
-   dbk_consumer_event_subkey.len = strlen(dbk_consumer_event_subkey.s);
-
 
if(kz_init_avp()) {
LM_ERR("Error in avp params\n");


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