Changeset 537:616848d6f020 in freeDiameter
- Timestamp:
- Sep 10, 2010, 11:03:43 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_radgw/rgwx_acct.c
r536 r537 159 159 int send_str; /* If not 0, we must send a STR when the ACA is received. */ 160 160 uint32_t term_cause; /* If not 0, the Termination-Cause to put in the STR. */ 161 /* Temporary : try sending the User-Name back in Accounting-Response for RADIUS */162 uint8_t *username;163 size_t un_size;164 161 }; 165 166 static void free_sess_state(struct sess_state *s) {167 if (s)168 free(s->username);169 free(s);170 }171 162 172 163 /* Initialize the plugin */ … … 182 173 memset(new, 0, sizeof(struct rgwp_config)); 183 174 184 CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, free _sess_state) );175 CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, free ) ); 185 176 new->confstr = conffile; 186 177 … … 1196 1187 } 1197 1188 st->term_cause = str_cause; 1198 if (un && un_len) {1199 CHECK_MALLOC( st->username = malloc(un_len) );1200 memcpy(st->username, un, un_len);1201 st->un_size = un_len;1202 }1203 1189 CHECK_FCT( fd_sess_state_store( cs->sess_hdl, *session, &st ) ); 1204 1190 } … … 1367 1353 Specific. 1368 1354 */ 1369 1370 /* Well, it seems some devices are expecting the user name ??? */1371 if (st->username) {1372 CHECK_MALLOC(radius_msg_add_attr(*rad_fw, RADIUS_ATTR_USER_NAME, st->username, st->un_size));1373 }1374 1355 1375 1356 /* Now loop in the list of AVPs and convert those that we know how */ … … 1444 1425 -- done in radius_msg_finish_srv 1445 1426 */ 1446 1447 free_sess_state(st);1448 1427 1449 1428 return 0;
Note: See TracChangeset
for help on using the changeset viewer.