/** Remove VPs for laziness
*
+ * @todo - replace this with a dcursor, and remove everything which matches the dcursor.
*/
static int remove_vps(request_t *request, edit_map_t *current)
{
} else if (tmpl_find_vp(¤t->lhs.vp, request, current->lhs.vpt) < 0) {
fr_pair_t *parent;
+ request_t *other = request;
/*
* Get the list.
* // vp is the pair we need to edit.
* }
*/
- parent = tmpl_get_list(request, current->lhs.vpt);
+ if (tmpl_request_ptr(&other, tmpl_request(current->lhs.vpt)) < 0) {
+ REDEBUG("Failed to find request for %s", current->lhs.vpt->name);
+ goto error;
+ }
+ fr_assert(other != NULL);
+
+ parent = tmpl_get_list(other, current->lhs.vpt);
if (!parent) {
REDEBUG("Failed to find list for %s", current->lhs.vpt->name);
goto error;