RADIUS message constructor accepts a message code parameter

This commit is contained in:
Martin Willi
2012-01-30 19:11:08 +01:00
parent 7171d8765e
commit 370de553f8
3 changed files with 8 additions and 7 deletions
@@ -423,12 +423,12 @@ static private_radius_message_t *radius_message_create()
/**
* See header
*/
radius_message_t *radius_message_create_request()
radius_message_t *radius_message_create_request(radius_message_code_t code)
{
private_radius_message_t *this = radius_message_create();
INIT(this->msg,
.code = RMC_ACCESS_REQUEST,
.code = code,
.identifier = 0,
.length = htons(sizeof(rmsg_t)),
);