request->password = NULL;
for (vp = request->packet->vps; vp != NULL; vp = vp->next) {
- if (vp->vendor) continue;
+ if (vp->vendor != 0) continue;
if ((vp->attribute == PW_USER_NAME) &&
!request->username) {
request->password = vp;
}
- if (request->username && request->password) continue;
+ if (request->username && request->password) break;
}
}
/*
* Attributes aren't the same, skip them.
*/
- if ((from_list[i]->attribute != to_list[j]->attribute) &&
+ if ((from_list[i]->attribute != to_list[j]->attribute) ||
(from_list[i]->vendor != to_list[j]->vendor)) {
continue;
}