[Devel] [ openser-Bugs-1596427 ] acc module + RADIUS values issue

SourceForge.net noreply at sourceforge.net
Wed Nov 15 20:27:08 CET 2006


Bugs item #1596427, was opened at 2006-11-14 17:47
Message generated for change (Comment added) made by phsultan
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1596427&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Philippe Sultan (phsultan)
Assigned to: Nobody/Anonymous (nobody)
Summary: acc module + RADIUS values issue

Initial Comment:
Hi,

starting openser along with acc compiled for RADIUS
fails with the following message :
 0(0) ACC - initializing
 0(0) ERROR: acc: can't get code for the  attribute value
 0(0) ERROR:acc:mod_init: failed to init radius
 0(0) init_mod(): Error while initializing module acc


In modules/acc/dict.h, the INIT_AV macro takes V_MAX as
the maximum value to look into the rd_vals struct
defined in modules/acc/acc.c. Actually, rd_vals has its
max number defined in modules/acc/acc.c :
RV_STATIC_MAX, which conflicts with V_MAX to my
understanding.

A simple patch is attached to solve this issue.

----------------------------------------------------------------------

>Comment By: Philippe Sultan (phsultan)
Date: 2006-11-15 20:27

Message:
Logged In: YES 
user_id=1645271
Originator: YES

Oops. Realized that INIT_AV is used by other modules which don't know
anything about RV_STATIC_MAX, which prevents compilation :
authrad_mod.c
avp_radius.c
grouprad_mod.c
urirad_mod.c

New patch modifies acc.c to iterate through rd_vals with the scope defined
in dict.h. I am not sure how you guys want to handle that though :
Index: modules/acc/acc.c
===================================================================
RCS file: /cvsroot/openser/sip-server/modules/acc/acc.c,v
retrieving revision 1.19
diff -u -r1.19 acc.c
--- modules/acc/acc.c   27 Oct 2006 11:28:28 -0000      1.19
+++ modules/acc/acc.c   15 Nov 2006 19:16:11 -0000
@@ -426,8 +426,6 @@
 #ifdef RAD_ACC
 enum { RA_ACCT_STATUS_TYPE=0, RA_SERVICE_TYPE, RA_SIP_RESPONSE_CODE,
        RA_SIP_METHOD, RA_TIME_STAMP, RA_STATIC_MAX};
-enum {RV_STATUS_START=0, RV_STATUS_STOP, RV_STATUS_FAILED,
-       RV_SIP_SESSION, RV_STATIC_MAX};
 static struct attr
        rd_attrs[RA_STATIC_MAX+ACC_CORE_LEN-2+MAX_ACC_EXTRA+MAX_ACC_LEG];
 static struct val rd_vals[RV_STATIC_MAX];
@@ -449,10 +447,10 @@
        rd_attrs[n++].n                  = "Sip-To-Tag";
        rd_attrs[n++].n                  = "Acct-Session-Id";
 
-       rd_vals[RV_STATUS_START].n        = "Start";
-       rd_vals[RV_STATUS_STOP].n         = "Stop";
-       rd_vals[RV_STATUS_FAILED].n       = "Failed";
-       rd_vals[RV_SIP_SESSION].n         = "Sip-Session";
+       rd_vals[V_STATUS_START].n        = "Start";
+       rd_vals[V_STATUS_STOP].n         = "Stop";
+       rd_vals[V_STATUS_FAILED].n       = "Failed";
+       rd_vals[V_SIP_SESSION].n         = "Sip-Session";
 
        /* add and count the extras as attributes */
        n += extra2attrs( rad_extra, rd_attrs, n);


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1596427&group_id=139143



More information about the Devel mailing list