Mercurial > hg > freeDiameter
comparison extensions/app_radgw/rgw_clients.c @ 550:4c935aecee6c
Hide and automate the Proxy-State attributes management in RADIUS gateway
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Wed, 15 Sep 2010 14:24:45 +0900 |
parents | 345537783a90 |
children | 153cd2600fcf |
comparison
equal
deleted
inserted
replaced
549:1b8809c7d7cc | 550:4c935aecee6c |
---|---|
972 /* We don't support this case yet */ | 972 /* We don't support this case yet */ |
973 ASSERT(0); | 973 ASSERT(0); |
974 return ENOTSUP; | 974 return ENOTSUP; |
975 } | 975 } |
976 | 976 |
977 /* Add all the Proxy-States back in the message */ | |
978 for (p = 0; p < req->ps_nb; p++) { | |
979 struct radius_attr_hdr * attr = (struct radius_attr_hdr *)(req->radius.buf + req->radius.attr_pos[req->ps_first + p]); | |
980 | |
981 if (radius_msg_add_attr_to_array(*msg, attr)) { | |
982 TRACE_DEBUG(INFO, "Error in radius_msg_add_attr_to_array, ENOMEM"); | |
983 radius_msg_free(*msg); | |
984 free(*msg); | |
985 *msg = NULL; | |
986 return ENOMEM; | |
987 } | |
988 } | |
989 | |
990 /* Add the Message-Authenticator if needed, and other final tasks */ | |
977 if (radius_msg_finish_srv(*msg, cli->key.data, cli->key.len, req->radius.hdr->authenticator)) { | 991 if (radius_msg_finish_srv(*msg, cli->key.data, cli->key.len, req->radius.hdr->authenticator)) { |
978 TRACE_DEBUG(INFO, "An error occurred while preparing the RADIUS answer"); | 992 TRACE_DEBUG(INFO, "An error occurred while preparing the RADIUS answer"); |
979 radius_msg_free(*msg); | 993 radius_msg_free(*msg); |
980 free(*msg); | 994 free(*msg); |
981 *msg = NULL; | 995 *msg = NULL; |