Module: sip-router Branch: master Commit: 3ad60fe1e229b3c1fc3a854d57eac223094294ad URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3ad60fe1...
Author: Olle E. Johansson oej@edvina.net Committer: Olle E. Johansson oej@edvina.net Date: Thu Dec 20 18:51:52 2012 +0100
pike: Import pike.top rpc call from modules_s/pike
Thanks to Ovidiu for pointers in the right direction.
---
modules_k/pike/README | 42 +++++++- modules_k/pike/doc/pike.xml | 2 +- modules_k/pike/doc/pike_rpc.xml | 35 +++++++ modules_k/pike/ip_tree.c | 57 +++++++++++- modules_k/pike/ip_tree.h | 11 ++ modules_k/pike/pike.c | 8 ++ modules_k/pike/pike_rpc.c | 193 +++++++++++++++++++++++++++++++++++++++ modules_k/pike/pike_rpc.h | 9 ++ modules_k/pike/pike_top.c | 91 ++++++++++++++++++ modules_k/pike/pike_top.h | 28 ++++++ 10 files changed, 468 insertions(+), 8 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=3ad6...
CC (gcc) [M pike.so] pike_rpc.o pike_rpc.c: In function âtraverse_subtreeâ: pike_rpc.c:40: warning: passing argument 3 of âpike_top_add_entryâ from incompatible pointer type pike_top.h:19: note: expected âunsigned int *â but argument is of type âshort unsigned int *â pike_rpc.c:40: warning: passing argument 4 of âpike_top_add_entryâ from incompatible pointer type pike_top.h:19: note: expected âunsigned int *â but argument is of type âshort unsigned int *â pike_rpc.c:43: warning: passing argument 3 of âpike_top_add_entryâ from incompatible pointer type pike_top.h:19: note: expected âunsigned int *â but argument is of type âshort unsigned int *â pike_rpc.c:43: warning: passing argument 4 of âpike_top_add_entryâ from incompatible pointer type pike_top.h:19: note: expected âunsigned int *â but argument is of type âshort unsigned int *â
On Thu, Dec 20, 2012 at 12:53 PM, Olle E. Johansson oej@edvina.net wrote:
Module: sip-router Branch: master Commit: 3ad60fe1e229b3c1fc3a854d57eac223094294ad URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3ad60fe1...
Author: Olle E. Johansson oej@edvina.net Committer: Olle E. Johansson oej@edvina.net Date: Thu Dec 20 18:51:52 2012 +0100
pike: Import pike.top rpc call from modules_s/pike
Thanks to Ovidiu for pointers in the right direction.
modules_k/pike/README | 42 +++++++- modules_k/pike/doc/pike.xml | 2 +- modules_k/pike/doc/pike_rpc.xml | 35 +++++++ modules_k/pike/ip_tree.c | 57 +++++++++++- modules_k/pike/ip_tree.h | 11 ++ modules_k/pike/pike.c | 8 ++ modules_k/pike/pike_rpc.c | 193 +++++++++++++++++++++++++++++++++++++++ modules_k/pike/pike_rpc.h | 9 ++ modules_k/pike/pike_top.c | 91 ++++++++++++++++++ modules_k/pike/pike_top.h | 28 ++++++ 10 files changed, 468 insertions(+), 8 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=3ad6...
If I run top without any parameter I get '400: Invalid parameter value'. According to the docs, HOT is used as default. Then the command should return a 200, not a 400.
If I run it with param 'blah', it returns '200: OK'. According to the docs, possible values are 'HOT' and 'ALL'. For unknown parameters, it should return '400: Invalid parameter value'.
-ovidiu
On Thu, Dec 20, 2012 at 12:53 PM, Olle E. Johansson oej@edvina.net wrote:
Module: sip-router Branch: master Commit: 3ad60fe1e229b3c1fc3a854d57eac223094294ad URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3ad60fe1...
Author: Olle E. Johansson oej@edvina.net Committer: Olle E. Johansson oej@edvina.net Date: Thu Dec 20 18:51:52 2012 +0100
pike: Import pike.top rpc call from modules_s/pike
Thanks to Ovidiu for pointers in the right direction.
modules_k/pike/README | 42 +++++++- modules_k/pike/doc/pike.xml | 2 +- modules_k/pike/doc/pike_rpc.xml | 35 +++++++ modules_k/pike/ip_tree.c | 57 +++++++++++- modules_k/pike/ip_tree.h | 11 ++ modules_k/pike/pike.c | 8 ++ modules_k/pike/pike_rpc.c | 193 +++++++++++++++++++++++++++++++++++++++ modules_k/pike/pike_rpc.h | 9 ++ modules_k/pike/pike_top.c | 91 ++++++++++++++++++ modules_k/pike/pike_top.h | 28 ++++++ 10 files changed, 468 insertions(+), 8 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=3ad6...
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
20 dec 2012 kl. 19:07 skrev Ovidiu Sas osas@voipembedded.com:
If I run top without any parameter I get '400: Invalid parameter value'. According to the docs, HOT is used as default. Then the command should return a 200, not a 400.
If I run it with param 'blah', it returns '200: OK'. According to the docs, possible values are 'HOT' and 'ALL'. For unknown parameters, it should return '400: Invalid parameter value'.
Will check. Thanks.
Is this different from the old module? I don't think I changed the logic, only include files and missing functions, but if the functions they call have changed, it may cause issues.
/O
-ovidiu
On Thu, Dec 20, 2012 at 12:53 PM, Olle E. Johansson oej@edvina.net wrote:
Module: sip-router Branch: master Commit: 3ad60fe1e229b3c1fc3a854d57eac223094294ad URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3ad60fe1...
Author: Olle E. Johansson oej@edvina.net Committer: Olle E. Johansson oej@edvina.net Date: Thu Dec 20 18:51:52 2012 +0100
pike: Import pike.top rpc call from modules_s/pike
Thanks to Ovidiu for pointers in the right direction.
modules_k/pike/README | 42 +++++++- modules_k/pike/doc/pike.xml | 2 +- modules_k/pike/doc/pike_rpc.xml | 35 +++++++ modules_k/pike/ip_tree.c | 57 +++++++++++- modules_k/pike/ip_tree.h | 11 ++ modules_k/pike/pike.c | 8 ++ modules_k/pike/pike_rpc.c | 193 +++++++++++++++++++++++++++++++++++++++ modules_k/pike/pike_rpc.h | 9 ++ modules_k/pike/pike_top.c | 91 ++++++++++++++++++ modules_k/pike/pike_top.h | 28 ++++++ 10 files changed, 468 insertions(+), 8 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=3ad6...
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- VoIP Embedded, Inc. http://www.voipembedded.com
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
21 dec 2012 kl. 08:32 skrev "Olle E. Johansson" oej@edvina.net:
20 dec 2012 kl. 19:07 skrev Ovidiu Sas osas@voipembedded.com:
If I run top without any parameter I get '400: Invalid parameter value'. According to the docs, HOT is used as default. Then the command should return a 200, not a 400.
If I run it with param 'blah', it returns '200: OK'. According to the docs, possible values are 'HOT' and 'ALL'. For unknown parameters, it should return '400: Invalid parameter value'.
Will check. Thanks.
Is this different from the old module? I don't think I changed the logic, only include files and missing functions, but if the functions they call have changed, it may cause issues.
Seems to have been a problem with the old implementation. Added a fix.
I added an error code for bad argument (copied from htable). No argument works on my system - without any data. Will try to forcing some data into the table later.
# /usr/local/sbin/sercmd pike.top skrep error: 500 - Bad argument. Select: ALL, HOT or WARM
# /usr/local/sbin/sercmd pike.top { max_hits: 30 number_of_rows: 0 }
/O