Changeset 996:cf09fde3d7f5 in freeDiameter for extensions/app_radgw/rgwx_echodrop.c
- Timestamp:
- Mar 20, 2013, 12:13:14 AM (11 years ago)
- Branch:
- default
- Children:
- 997:632913581c37, 998:ad6c1ee04d2d
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_radgw/rgwx_echodrop.c
r979 r996 119 119 120 120 /* Handle attributes from a RADIUS request as specified in the configuration */ 121 static int ed_rad_req( struct rgwp_config * cs, struct session ** session, structradius_msg * rad_req, struct radius_msg ** rad_ans, struct msg ** diam_fw, struct rgw_client * cli )121 static int ed_rad_req( struct rgwp_config * cs, struct radius_msg * rad_req, struct radius_msg ** rad_ans, struct msg ** diam_fw, struct rgw_client * cli ) 122 122 { 123 123 size_t nattr_used = 0; 124 124 int idx; 125 126 125 struct fd_list echo_list = FD_LIST_INITIALIZER(echo_list); 127 126 struct fd_list *li; 128 127 129 TRACE_ENTRY("%p %p %p %p %p %p", cs, session, rad_req, rad_ans, diam_fw, cli);130 CHECK_PARAMS(cs && rad_req && session);128 TRACE_ENTRY("%p %p %p %p %p", cs, rad_req, rad_ans, diam_fw, cli); 129 CHECK_PARAMS(cs && rad_req); 131 130 132 131 /* For each attribute in the original message */ … … 217 216 /* Save the echoed values in the session, if any */ 218 217 if (!FD_IS_LIST_EMPTY(&echo_list)) { 219 CHECK_PARAMS_DO(*session, 218 struct session * sess; 219 220 CHECK_FCT( fd_msg_sess_get(fd_g_config->cnf_dict, *diam_fw, &sess, NULL) ); 221 222 CHECK_PARAMS_DO(sess, 220 223 { 221 224 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)." … … 231 234 232 235 /* Save the list in the session */ 233 CHECK_FCT( fd_sess_state_store( cs->sess_hdl, *session, &li ) );236 CHECK_FCT( fd_sess_state_store( cs->sess_hdl, sess, &li ) ); 234 237 } 235 238 … … 238 241 239 242 /* Process an answer: add the ECHO attributes back, if any */ 240 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, int * stateful)243 static int ed_diam_ans( struct rgwp_config * cs, struct msg ** diam_ans, struct radius_msg ** rad_fw, struct rgw_client * cli ) 241 244 { 242 245 struct fd_list * list = NULL; 243 244 TRACE_ENTRY("%p %p %p %p %p %p", cs, session, diam_ans, rad_fw, cli, stateful); 246 struct session * sess; 247 248 TRACE_ENTRY("%p %p %p %p", cs, diam_ans, rad_fw, cli); 245 249 CHECK_PARAMS(cs); 246 250 251 CHECK_FCT( fd_msg_sess_get(fd_g_config->cnf_dict, *diam_ans, &sess, NULL) ); 252 247 253 /* If there is no session associated, just give up */ 248 if (! sess ion) {254 if (! sess ) { 249 255 TRACE_DEBUG(FULL, "No session associated with the message, nothing to do here..."); 250 256 return 0; … … 252 258 253 259 /* Now try and retrieve any data from the session */ 254 CHECK_FCT( fd_sess_state_retrieve( cs->sess_hdl, sess ion, &list ) );260 CHECK_FCT( fd_sess_state_retrieve( cs->sess_hdl, sess, &list ) ); 255 261 if (list == NULL) { 256 262 /* No attribute saved in the session, just return */
Note: See TracChangeset
for help on using the changeset viewer.