[OpenSIPS-Devel] [OpenSIPS/opensips] d50bd7: RPM spec: support for el7

2014-10-16 Thread Nick Altmann
  Branch: refs/heads/1.11
  Home:   https://github.com/OpenSIPS/opensips
  Commit: d50bd786409880491b5d0c7056d572cdc4838117
  
https://github.com/OpenSIPS/opensips/commit/d50bd786409880491b5d0c7056d572cdc4838117
  Author: Nick Altmann nick.altm...@gmail.com
  Date:   2014-10-16 (Thu, 16 Oct 2014)

  Changed paths:
M packaging/fedora/opensips.spec

  Log Message:
  ---
  RPM spec: support for el7


___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [OpenSIPS/opensips] a2e761: RPM spec: support for el7

2014-10-16 Thread Nick Altmann
  Branch: refs/heads/1.8
  Home:   https://github.com/OpenSIPS/opensips
  Commit: a2e7612c776b903b99ae95f3f182de1ea5385509
  
https://github.com/OpenSIPS/opensips/commit/a2e7612c776b903b99ae95f3f182de1ea5385509
  Author: Nick Altmann nick.altm...@gmail.com
  Date:   2014-10-16 (Thu, 16 Oct 2014)

  Changed paths:
M packaging/fedora/opensips.spec

  Log Message:
  ---
  RPM spec: support for el7


___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] 400 Bad Request (Invalid content length X / Y) (#358)

2014-10-16 Thread Bogdan Andrei IANCU
Good it was sorted out and it wasn't OpenSIPS.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/358#issuecomment-59340755___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] 400 Bad Request (Invalid content length X / Y) (#358)

2014-10-16 Thread Bogdan Andrei IANCU
Closed #358.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/358#event-179344392___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] load_balancer module enhancements (#345)

2014-10-16 Thread Bogdan Andrei IANCU
I start reviewing the patches and : 
 - the first patch - a7549e00bdd3fd13fc20777bccf935d41303980e - I do not agree 
with the approach - once you started a LB session, you should not change the 
set or resources.  If you need to do that, first reset the existing LB session 
and then create a new one.
 - patch 2 and 3 are ok as functionality - please make a separate PR with them, 
so I can accept them.
 - patch 4 - I do not see any reason for defining the _NEG algs, as the only 
difference is about handling the negative values - we could simply do that all 
the time

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/345#issuecomment-59343939___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Modparam string not duplicated when USE_FUNC_PARAM flag set (#349)

2014-10-16 Thread Bogdan Andrei IANCU
Hi @mikomarrache - the val points into parser memory (lex/yacc) and it is no 
longer available after the script parsing was done.
When having the a STR param, it is a must to clone it as the module gets access 
to that param only after the cfg parsing.
With the function, this function is called during the cfg parsing, so there is 
no need to clone the val. OF course, the function should not keep the val 
pointer after its ending. If it needs to store the val, the function itself 
must do the cloning.
So, the code is ok, but you need to be careful in param functions and clone the 
val if you need it outside function scope.

Regards, Bogdan

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/349#issuecomment-59344580___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] fr_inv_timer restarted when restart_fr_on_each_reply = 0 and replies sequence is 100, 183, 180, 183 (#342)

2014-10-16 Thread Bogdan Andrei IANCU
@mikomarrache , any updates with the testing ?

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/342#issuecomment-59344649___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [opensips] added exec(cmd, output, input, avpenv) function for exec module (#360)

2014-10-16 Thread Ionut Ionita

You can merge this Pull Request by running:

  git pull https://github.com/ionutrazvanionita/opensips master

Or you can view, comment on it, or merge it online at:

  https://github.com/OpenSIPS/opensips/pull/360

-- Commit Summary --

  * added exec(cmd,output,input,avpenv) function for exec module

-- File Changes --

M modules/exec/README (51)
M modules/exec/doc/exec_admin.xml (66)
M modules/exec/exec.c (151)
M modules/exec/exec.h (4)
A modules/exec/exec.so (0)
M modules/exec/exec_hf.c (4)
M modules/exec/exec_hf.h (3)
M modules/exec/exec_mod.c (213)
M modules/exec/kill.c (45)
M modules/exec/kill.h (1)

-- Patch Links --

https://github.com/OpenSIPS/opensips/pull/360.patch
https://github.com/OpenSIPS/opensips/pull/360.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/360
___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] added exec(cmd, output, input, avpenv) function for exec module (#360)

2014-10-16 Thread Walter Doekes
 + * output - pseudovariable where to store the output from the
 +   standard output of the command. Keep in mind that if this
 +   parameter is set, the async paramater will not be taken in
 +   consideration.
 + * input - String to be passed to the standard input of the
 +   command. The string can be given as a pseudovariable.
 + * envavp - Avp where to store the values for the environment
 +   variables to be passed for the command. The names of the
 +   environment variables will be OSIPS_EXEC_# where # will
 +   start from 0. For example if you store 2 values into an avp
 +   (a and b) OSIPS_EXEC_0 will contain the first value and
 +   OSIPS_EXEC_1 the second value.
 +
 +   WARNING: any OpenSIPS pseudo-vars which may contain special
 +   bash characters should be placed inside quotes, e.g.
 +   exec_getenv('$ct');

getenv? And if you require single quotes, shouldn't you also require the 
contents to be quoted? Or a single quote in $ct would undo the first quote...

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/360/files#r18956585___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] added exec(cmd, output, input, avpenv) function for exec module (#360)

2014-10-16 Thread Walter Doekes
 + } else if (outvar) {
 + pid = __popen(command-s, r, pout);
 + } else {
 + pid = fork();
 + if (pid == 0) {
 + execl(/bin/sh, /bin/sh, -c, command-s, NULL);
 + exit(-1);
 + }
 + }
 +
 + if (input-len) {
 + if (fwrite(input-s, 1, input-len, pin) != input-len) {
 + LM_ERR(failed to write to pipe\n);
 + ser_error=E_EXEC;
 + goto error;
 + }

This will stall if there is lots of output before the input is needed.

Pipes won't buffer an unlimited amount of data, and I doube that FILE streams 
will either.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/360/files#r18956935___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] added exec(cmd, output, input, avpenv) function for exec module (#360)

2014-10-16 Thread Ionut Ionita
 @@ -243,6 +246,48 @@ exec_getenv(HOSTNAME);
  exec_getenv(HOSTNAME, $avp(localhost));
  ...
  
 +1.4.5.  exec(command, [output], [input], [envavp])
 +
 +   Executes an external command. The input is passed to the
 +   standard input of the new process, if specified, and the output
 +   is saved in the output variable.
 +
 +   Meaning of the parameters is as follows:
 + * command - command to be executed.It can include
 +   pseudovariables.
 + * output - pseudovariable where to store the output from the
 +   standard output of the command. Keep in mind that if this
 +   parameter is set, the async paramater will not be taken in
 +   consideration.

No. Stderr is not supported.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/360/files#r18957003___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] added exec(cmd, output, input, avpenv) function for exec module (#360)

2014-10-16 Thread Walter Doekes
 +
 + if (ferror(pin)) {
 + LM_ERR(writing pipe: %s\n, strerror(errno));
 + ser_error=E_EXEC;
 + goto error;
 + }
 + pclose(pin);
 + }
 +
 + schedule_to_kill(pid);
 + wait(exit_status);
 +
 + if (outvar) {
 + while (fgets(tmpbuf, MAX_LINE_SIZE, pout)) {
 + tmplen = strlen(tmpbuf);
 + memcpy(buf+buflen, tmpbuf, tmplen);

Who checks that buf doesn't overflow? And use fread instead of fgets, since you 
don't care about there the line feeds are.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/360/files#r18957149___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [OpenSIPS/opensips] bc9442: Include script async events into reactor.

2014-10-16 Thread Bogdan-Andrei Iancu
  Branch: refs/heads/async
  Home:   https://github.com/OpenSIPS/opensips
  Commit: bc9442324a796470cd45cd1cfeb35e17637497d6
  
https://github.com/OpenSIPS/opensips/commit/bc9442324a796470cd45cd1cfeb35e17637497d6
  Author: Bogdan-Andrei Iancu bog...@opensips.org
  Date:   2014-10-16 (Thu, 16 Oct 2014)

  Changed paths:
M async.c
M async.h
M reactor_defs.h
M tcp_read.c
M udp_server.c

  Log Message:
  ---
  Include script async events into reactor.


  Commit: c0754e6077ba27dad4d480e6032d3ec7f5900069
  
https://github.com/OpenSIPS/opensips/commit/c0754e6077ba27dad4d480e6032d3ec7f5900069
  Author: Bogdan-Andrei Iancu bog...@opensips.org
  Date:   2014-10-16 (Thu, 16 Oct 2014)

  Changed paths:
A modules/tm/async.c
A modules/tm/async.h
M modules/tm/tm.c

  Log Message:
  ---
  TM exports async related handlers to core.


Compare: 
https://github.com/OpenSIPS/opensips/compare/8052c80c4fea...c0754e6077ba___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] load_balancer module enhancements (#345)

2014-10-16 Thread Sergey KHripchenko
@bogdan-iancu, thanks for review!
About pt1.
In original approach we cannot 'reset' LB session by just calling lb_reset() 
since we don't know the resources set used in previous time. Also the original 
approach is 'provoking' users to change resources set, since despite we don't 
want them to do so, we asking them to always provide a resources set every call 
of load_balance() and never tell them that we assume this string(and group by 
the way) to be constant across LB session.
Maybe we need to update docs? (and enforce it in the code?)

Again. I still like my re-arrangement of existing code. Would you be agree if 
I'll rewrite load_balance() without ability to modify 'group' and resources 
set?.

Would you be agree if we will save initial 'resources set' and group(already 
happens) and completely ignore them for a future subsequent load_balance() 
calls? This way we allow:
1. lb_reset() to be called without parameters
2. properly maintain safety of our approach - enforce constant group/resources 
set per LB session.

About pt.4.
The difference between _NEG and original algs is that when we encounter 
negative capacity for a resource - we skip the corresponding target as a valid 
target. so for example when all our targets are having negative capacity - 
original algs force load_balance() to return 'error', but _NEG algs will still 
work selecting less loaded target. Is it possible to keep both these abilities 
anyhow?

One more.
Is it possible that global LB configuration (and thus all destinations and 
resources) could be changed during existing LB sessions thus invalidating our 
saved group and resources set bit-mask?
(not during the load_balance() call but between them...)
Do we need to worry about it?

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/345#issuecomment-59378236___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [opensips] Multiple route parameters bug (#361)

2014-10-16 Thread Liviu Chircu
Supposing we have our `test_route` and we want to pass two pseudo-vars:

route(test_route, $fU, $rp);

This will fail with:
Oct 16 17:35:01 [30466] CRITICAL:core:yyerror: parse error in config file 
etc/mine.config, line 270, column 28-32: syntax error
Oct 16 17:35:01 [30466] CRITICAL:core:yyerror: parse error in config file 
etc/mine.config, line 270, column 32-33: bad routeargument

From the looks of it, the bug seems to be located in the parser, specifically 
in the code that parses a SCRIPTVAR token (cfg.lex +823). The parsing looks 
too simple, and it seems to fail to detect the comma, thus causing a pv 
parsing error!

To reinforce the above statement, note that `route(test_route, $fU)` actually 
works.

Version: 1.8+

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/361___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] opensips 1.11 and statistics (#239)

2014-10-16 Thread Liviu Chircu
Hello Nick,

Any updates on this issue?

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/239#issuecomment-59390993___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] opensips 1.11 and statistics (#239)

2014-10-16 Thread Nick Altmann
We have not expected this problem since last time. Now everything works
okay. Thank you.

--
Nick

2014-10-16 20:35 GMT+04:00 Liviu Chircu notificati...@github.com:

 Hello Nick,

 Any updates on this issue?

 —
 Reply to this email directly or view it on GitHub
 https://github.com/OpenSIPS/opensips/issues/239#issuecomment-59390993.

 ___
 Devel mailing list
 Devel@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] opensips 1.11 and statistics (#239)

2014-10-16 Thread Liviu Chircu
Closed #239.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/239#event-179838213___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel