Navigation



Ignore:
Timestamp:
Jul 1, 2010, 3:47:34 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Updated the app_radgw extension to allow more souple management of sessions, and stateful gateway features.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_radgw/rgwx_echodrop.c

    r340 r356  
    119119
    120120/* Handle attributes from a RADIUS request as specified in the configuration */
    121 static int ed_rad_req( struct rgwp_config * cs, struct session * session, struct radius_msg * rad_req, struct radius_msg ** rad_ans, struct msg ** diam_fw, struct rgw_client * cli )
     121static int ed_rad_req( struct rgwp_config * cs, struct session ** session, struct radius_msg * rad_req, struct radius_msg ** rad_ans, struct msg ** diam_fw, struct rgw_client * cli )
    122122{
    123123        size_t nattr_used = 0;
     
    128128       
    129129        TRACE_ENTRY("%p %p %p %p %p %p", cs, session, rad_req, rad_ans, diam_fw, cli);
    130         CHECK_PARAMS(cs && rad_req);
     130        CHECK_PARAMS(cs && rad_req && session);
    131131       
    132132        /* For each attribute in the original message */
     
    217217        /* Save the echoed values in the session, if any */
    218218        if (!FD_IS_LIST_EMPTY(&echo_list)) {
    219                 CHECK_PARAMS(session);
     219                CHECK_PARAMS_DO(*session,
     220                        {
     221                                fd_log_debug(   "[echodrop.rgwx] The extension is configured to echo some attributes from this message, but no session object has been created for it (yet).\n"
     222                                                "  Please check your configuration file and include a session-generating extension BEFORE calling echodrop.rgwx to echo attributes.\n"
     223                                                "  Please use debug.rgwx to retrieve more information.\n" );
     224                                return EINVAL;
     225                        } );
    220226               
    221227                /* Move the values in a dynamically allocated list */
     
    225231               
    226232                /* Save the list in the session */
    227                 CHECK_FCT( fd_sess_state_store( cs->sess_hdl, session, &li ) );
     233                CHECK_FCT( fd_sess_state_store( cs->sess_hdl, *session, &li ) );
    228234        }
    229235       
     
    232238
    233239/* Process an answer: add the ECHO attributes back, if any */
    234 static int ed_diam_ans( struct rgwp_config * cs, struct session * session, struct msg ** diam_ans, struct radius_msg ** rad_fw, struct rgw_client * cli )
     240static int ed_diam_ans( struct rgwp_config * cs, struct session * session, struct msg ** diam_ans, struct radius_msg ** rad_fw, struct rgw_client * cli, int * stateful )
    235241{
    236242        int ret;
    237243        struct fd_list * list = NULL;
    238244       
    239         TRACE_ENTRY("%p %p %p %p %p", cs, session, diam_ans, rad_fw, cli);
     245        TRACE_ENTRY("%p %p %p %p %p %p", cs, session, diam_ans, rad_fw, cli, stateful);
    240246        CHECK_PARAMS(cs);
    241247       
Note: See TracChangeset for help on using the changeset viewer.