FR_EDIT_INSERT, //!< insert a VP into a list, after another one.
} fr_edit_op_t;
+#if 0
+/*
+ * For debugging.
+ */
+static const char *edit_names[4] = {
+ "invalid",
+ "delete",
+ "record_value",
+ "insert",
+};
+#endif
+
/** Track a series of edits.
*
*/
int rcode;
#endif
+ fr_assert(vp != NULL);
+ PAIR_VERIFY(vp);
+
switch (e->op) {
case FR_EDIT_INVALID:
return -1;
if (to_replace->da != vp->da) return -1;
+ /*
+ * We call edit_record() twice, which involves two
+ * complete passes over the edit list. That's fine,
+ * either the edit list is small, OR we will eventially
+ * put the VPs to be edited into an RB tree.
+ */
if (edit_record(el, FR_EDIT_INSERT, vp, list, to_replace) < 0) return -1;
/*