void paircmp_free(void);
-/*
- * Less code == fewer bugs
- *
- * @param _a attribute
- * @param _b value
- * @param _c op
- */
-#define pair_make_request(_a, _b, _c) fr_pair_make(request->packet, &request->packet->vps, _a, _b, _c)
-#define pair_make_reply(_a, _b, _c) fr_pair_make(request->reply, &request->reply->vps, _a, _b, _c)
-#define pair_make_config(_a, _b, _c) fr_pair_make(request, &request->control, _a, _b, _c)
-
/** Allocate a VALUE_PAIR in the request list
*
* @param[in] _attr allocated.
if (request->reply->code == FR_CODE_ACCESS_REJECT) {
fr_pair_delete_by_num(&request->control, 0, FR_POST_AUTH_TYPE, TAG_ANY);
- vp = pair_make_config("Post-Auth-Type", "Reject", T_OP_SET);
- if (vp) (void) rad_postauth(request);
+
+ MEM(vp = fr_pair_afrom_num(request, 0, FR_POST_AUTH_TYPE));
+ fr_pair_value_from_str(vp, "Reject", -1);
+ fr_pair_add(&request->control, vp);
+
+ rad_postauth(request);
}
if (request->reply->code == FR_CODE_ACCESS_ACCEPT) {