Changeset 278:50bfb29bf036 in freeDiameter for extensions/app_radgw/rgw_clients.c
- Timestamp:
- Apr 23, 2010, 5:22:09 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_radgw/rgw_clients.c
r271 r278 260 260 rgw_msg_free(msg); 261 261 } else { 262 /* Update information for new message */ 263 if (cli->last[idx].ans) { 264 /* Free it */ 265 radius_msg_free(cli->last[idx].ans); 266 free(cli->last[idx].ans); 267 cli->last[idx].ans = NULL; 268 } 269 cli->last[idx].id = (*msg)->radius.hdr->identifier; 270 cli->last[idx].port = (*msg)->port; 262 /* We have not just received this message already */ 263 if (cli->last[idx].port == 0) { /* first message from this client */ 264 /* Just add the new information */ 265 ASSERT(cli->last[idx].ans == NULL); 266 cli->last[idx].id = (*msg)->radius.hdr->identifier; 267 cli->last[idx].port = (*msg)->port; 268 } else { 269 /* We have got previous message(s), update the info only if answered already */ 270 if (cli->last[idx].ans) { 271 cli->last[idx].id = (*msg)->radius.hdr->identifier; 272 cli->last[idx].port = (*msg)->port; 273 /* Free the previous answer */ 274 radius_msg_free(cli->last[idx].ans); 275 free(cli->last[idx].ans); 276 cli->last[idx].ans = NULL; 277 } 278 } 271 279 } 272 280 … … 607 615 } 608 616 cli->last[idx].ans = *msg; 617 cli->last[idx].id = req->radius.hdr->identifier; 618 cli->last[idx].port = req->port; 609 619 *msg = NULL; 610 620
Note: See TracChangeset
for help on using the changeset viewer.