Skip to content

Commit

Permalink
session_init returns 0/1
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Jul 26, 2015
1 parent dd7cd92 commit a8d1c2a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/modules/rlm_eap/types/rlm_eap_pwd/rlm_eap_pwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,15 @@ static int mod_session_init (void *instance, eap_handler_t *handler)

if (!inst || !handler) {
ERROR("rlm_eap_pwd: Initiate, NULL data provided");
return -1;
return 0;
}

/*
* make sure the server's been configured properly
*/
if (!inst->server_id) {
ERROR("rlm_eap_pwd: Server ID is not configured");
return -1;
return 0;
}
switch (inst->group) {
case 19:
Expand All @@ -199,10 +199,10 @@ static int mod_session_init (void *instance, eap_handler_t *handler)

default:
ERROR("rlm_eap_pwd: Group is not supported");
return -1;
return 0;
}

if ((session = talloc_zero(handler, pwd_session_t)) == NULL) return -1;
if ((session = talloc_zero(handler, pwd_session_t)) == NULL) return 0;
talloc_set_destructor(session, _free_pwd_session);
/*
* set things up so they can be free'd reliably
Expand Down Expand Up @@ -248,7 +248,7 @@ static int mod_session_init (void *instance, eap_handler_t *handler)
*/
session->out_len = sizeof(pwd_id_packet_t) + strlen(inst->server_id);
if ((session->out = talloc_zero_array(session, uint8_t, session->out_len)) == NULL) {
return -1;
return 0;
}

packet = (pwd_id_packet_t *)session->out;
Expand Down

0 comments on commit a8d1c2a

Please sign in to comment.