THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#299 - modules/debugger: be able to log assign actions
User who did this - Daniel-Constantin Mierla (miconda)
----------
The third patch iterates only on the first items of pv cache slots. There has to be a loop (while/for) inside the exiting FOR to go through all items in a cache slot (via ->next).
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299#comment907
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#299 - modules/debugger: be able to log assign actions
User who did this - Daniel-Constantin Mierla (miconda)
----------
This one in first patch is still wrong:
@@ -2636,7 +2634,8 @@ avp_pvar: AVP_OR_PVAR {
}
memset(lval_tmp, 0, sizeof(*lval_tmp));
s_tmp.s=$1; s_tmp.len=strlen(s_tmp.s);
- if (pv_parse_spec2(&s_tmp, &lval_tmp->lv.pvs, 1)==0){
+ lval_tmp->lv.pvs = pv_cache_get(&s_tmp);
+ if (pv_parse_spec2(&s_tmp, lval_tmp->lv.pvs, 1)==0){
/* not a pvar, try avps */
No need for:
+ if (pv_parse_spec2(&s_tmp, lval_tmp->lv.pvs, 1)==0){
The condition should be:
if(lval_tmp->lv.pvs == NULL) {
So, if pv not found in cache, then try avp.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299#comment906
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#299 - modules/debugger: be able to log assign actions
User who did this - Víctor Seva (linuxmaniac)
----------
Patches refreshed. I merged the previous two first ones.
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299#comment905
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#299 - modules/debugger: be able to log assign actions
User who did this - Daniel-Constantin Mierla (miconda)
----------
Looks like it is that one. Maybe you can generate a new set of clean patches, because patches to patches are hard to track.
If it is avp, the result from pv cache should be NULL, nothing to free. Anyhow, never free a the result from cache, it is there with a purpose -- allocated once, used by many -- if you free it, you screw the many others.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299#comment904
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#299 - modules/debugger: be able to log assign actions
User who did this - Víctor Seva (linuxmaniac)
----------
Is this what you are talking about? (Changes on the attached file)
If it's an avp. Should I pgk_free the result from the previous pv_cache_get() call?
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299#comment903
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#299 - modules/debugger: be able to log assign actions
User who did this - Daniel-Constantin Mierla (miconda)
----------
I could spot some mallocs for pv_spec_t in the core as well as writing over a pointer returned from cache (which is really broken if happens like that, maybe I misunderstood).
The interpreter should just get the pointer from cache, if no result, try AVP (if enabled in this way). But no alloc or overwriting the content returned from cache query.
----------
More information can be found at the following URL:
https://sip-router.org/tracker/index.php?do=details&task_id=299#comment902
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
Víctor Seva has taken ownership of the following task:
FS#299 - modules/debugger: be able to log assign actions
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Víctor Seva (linuxmaniac)
Attached to Project - sip-router
Summary - modules/debugger: be able to log assign actions
Task Type - Feature Request
Category - Module
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Low
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - Implementing the idea:
"From what Andreas suggesting, printing the value of variables as they
are assigned is missing, probably can be added by hooking in the
interpreter when doing the assignment operation." [0]
[0] http://lists.sip-router.org/pipermail/sr-users/2013-April/077628.html
I had to change some things on core to be able to get this working:
- lvalue.[c/h]: from pv_spec_t to pv_spec_t* ( in order to be able to search for the name of a var with the pointer)
- cfg.y: use pv_cache_get() to get the pv_spec_t*
- lvalue.[c/h]: add callback to log_assign
- pvapi.c|pvar.h: add helper function pv_cache_get_name(pv_spec_t*) to get the name of a pvar on cache
Please, review if these changes are the right thing to do in this case.
On module debugger there is a cache of logged vars in order to not call pv_cache_get_name() over a over again.
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Module: sip-router
Branch: master
Commit: 8cba441b17c75cd078a499c24268c8a60c6b1771
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8cba441…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue May 28 15:48:22 2013 +0200
misc_radius: updated readme
- from a patch by Victor V. Kustov
---
modules/misc_radius/README | 51 +++++++++++++++++++------
modules/misc_radius/doc/misc_radius_admin.xml | 34 +++++++++++++++-
2 files changed, 70 insertions(+), 15 deletions(-)
diff --git a/modules/misc_radius/README b/modules/misc_radius/README
index 50d6008..ed2a47c 100644
--- a/modules/misc_radius/README
+++ b/modules/misc_radius/README
@@ -59,11 +59,12 @@ Daniel-Constantin Mierla
1.10. uri_extra parameter usage
1.11. use_sip_uri_host parameter usage
1.12. common_response parameter usage
- 1.13. radius_load_caller_avps() usage
- 1.14. radius_load_callee_avps() usage
- 1.15. radius_is_user_in() usage
- 1.16. radius_does_uri_exist() usage
- 1.17. radius_does_uri_user_exist() usage
+ 1.13. radius response with common_response value 1
+ 1.14. radius_load_caller_avps() usage
+ 1.15. radius_load_callee_avps() usage
+ 1.16. radius_is_user_in() usage
+ 1.17. radius_does_uri_exist() usage
+ 1.18. radius_does_uri_user_exist() usage
Chapter 1. Admin Guide
@@ -293,13 +294,39 @@ modparam("misc_radius", "use_sip_uri_host", 1)
3.11. common_response (integer)
Set it to 1 if you need common radius response attributes to be added
- as AVPs.
+ as AVPs in radius_load_caller_avps and radius_load_callee_avps with
+ name as radius attribute name and value as radius attribute value.
Default value is "0".
Example 1.12. common_response parameter usage
...
-modparam("misc_radius", "common_response", 21)
+modparam("misc_radius", "common_response", 1)
+...
+radius_load_caller_avps($fU);
+...
+
+ Example 1.13. radius response with common_response value 1
+...
+ Sending Access-Accept of id 60 to 192.168.25.32 port 59736
+ Session-Timeout = 4261674
+ next-hop-ip = "SIP/00111222333444@cisco-out"
+ SIP-AVP = "email:sr-users@lists.sip-router.org session-timeout#161 next-hop-
+ip:h323/0001111@myvoip-gate.kamailio.org"
+ session-protocol = "SIP"
+...
+
+$avp(Session-Timeout) has integer value 4261674
+$avp(next-hop-ip) has string value "SIP/005555777888@cisco-out"
+$avp(session-protocol) has string value "SIP"
+$avp(SIP-AVP) has string value "email:sr-users@lists.sip-router.org session-tim
+eout#161 next-hop-ip:h323/0001111@myvoip-gate.kamailio.org"
+
+...
+ When recieving negative response, check appropriate avp's:
+ $avp(Reply-Message) = "Not enough money on deposit '-89.83'. Rejected"
+ $avp(Filter-Id) = "neg_deposit"
+...
4. Functions
@@ -317,7 +344,7 @@ modparam("misc_radius", "common_response", 21)
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
- Example 1.13. radius_load_caller_avps() usage
+ Example 1.14. radius_load_caller_avps() usage
...
radius_load_caller_avps("$fU@$fd"); # take caller from From URI
...
@@ -332,7 +359,7 @@ radius_load_caller_avps("$au@$ar"); # take caller from Authorization
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
- Example 1.14. radius_load_callee_avps() usage
+ Example 1.15. radius_load_callee_avps() usage
...
radius_load_callee_avps("$rU@$rd"); # take callee from Request-URI
...
@@ -347,7 +374,7 @@ radius_load_callee_avps("$rU@$rd"); # take callee from Request-URI
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
BRANCH_ROUTE, and LOCAL_ROUTE.
- Example 1.15. radius_is_user_in() usage
+ Example 1.16. radius_is_user_in() usage
...
radius_is_user_in("$rU@$rd", "1"); # take user from Request-URI
...
@@ -362,7 +389,7 @@ radius_is_user_in("$au@$ar", "group_x");# take user from credentials
This function can be used from REQUEST_ROUTE and LOCAL_ROUTE.
- Example 1.16. radius_does_uri_exist() usage
+ Example 1.17. radius_does_uri_exist() usage
...
if (radius_does_uri_exist()) ... # check Request-URI
...
@@ -379,7 +406,7 @@ if (radius_does_uri_exist("$avp(i:99)")) ... # check URI in $avp(i:99)
This function can be used from REQUEST_ROUTE and LOCAL_ROUTE.
- Example 1.17. radius_does_uri_user_exist() usage
+ Example 1.18. radius_does_uri_user_exist() usage
...
if (radius_does_uri_user_exist()) ... # check Request-URI userpart
...
diff --git a/modules/misc_radius/doc/misc_radius_admin.xml b/modules/misc_radius/doc/misc_radius_admin.xml
index aff0973..950d8d4 100644
--- a/modules/misc_radius/doc/misc_radius_admin.xml
+++ b/modules/misc_radius/doc/misc_radius_admin.xml
@@ -307,7 +307,9 @@ modparam("misc_radius", "use_sip_uri_host", 1)
<title><varname>common_response</varname> (integer)</title>
<para>
Set it to 1 if you need common radius response attributes to
- be added as AVPs.
+ be added as AVPs in <function moreinfo="none">radius_load_caller_avps</function>
+ and <function moreinfo="none">radius_load_callee_avps</function>
+ with name as radius attribute name and value as radius attribute value.
</para>
<para>
Default value is <quote>0</quote>.
@@ -316,9 +318,35 @@ modparam("misc_radius", "use_sip_uri_host", 1)
<title><varname>common_response</varname> parameter usage</title>
<programlisting format="linespecific">
...
-modparam("misc_radius", "common_response", 21)
+modparam("misc_radius", "common_response", 1)
+...
+radius_load_caller_avps($fU);
+...
</programlisting>
- </example>
+ </example>
+ <example>
+ <title>radius response with <varname>common_response</varname> value 1</title>
+ <programlisting format="linespecific">
+...
+ Sending Access-Accept of id 60 to 192.168.25.32 port 59736
+ Session-Timeout = 4261674
+ next-hop-ip = "SIP/00111222333444@cisco-out"
+ SIP-AVP = "email:sr-users@lists.sip-router.org session-timeout#161 next-hop-ip:h323/0001111@myvoip-gate.kamailio.org"
+ session-protocol = "SIP"
+...
+
+$avp(Session-Timeout) has integer value 4261674
+$avp(next-hop-ip) has string value "SIP/005555777888@cisco-out"
+$avp(session-protocol) has string value "SIP"
+$avp(SIP-AVP) has string value "email:sr-users@lists.sip-router.org session-timeout#161 next-hop-ip:h323/0001111@myvoip-gate.kamailio.org"
+
+...
+ When recieving negative response, check appropriate avp's:
+ $avp(Reply-Message) = "Not enough money on deposit '-89.83'. Rejected"
+ $avp(Filter-Id) = "neg_deposit"
+...
+</programlisting>
+ </example>
</section>
</section>