]> git.puffer.fish Git - matthieu/frr.git/commit
lib, mgmtd: fix commit history location
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 25 Jan 2024 18:59:22 +0000 (19:59 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Sat, 27 Jan 2024 18:02:52 +0000 (19:02 +0100)
commitbfd6d8ee19e94f9cc945e3847f1fd275bbc01b44
tree4124cc71210fa6892189d56cc154819e735a4e31
parent567f5702c0ec53700388383030e55fee49459389
lib, mgmtd: fix commit history location

Both of these belong in `/var/lib`, not `/var/run`.

Rather hilariously, the history read in
`mgmt_history_read_cmt_record_index` was always failing, because it was
doing a `file_exists(MGMTD_COMMIT_FILE_PATH)` check.  Which is the wrong
macro - it's `.../commit-%s.json`, including the unprocessed `%s`, which
would never exist.

I guess noone ever tried if this actually works.  Cool.

On the plus side, this means I don't have to implement legacy
compatibility for this, since it never worked to begin with.

(SQLite3 DB location is also changed in this commit since it also uses
`DAEMON_DB_DIR`.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
configure.ac
lib/libfrr.c
mgmtd/mgmt_ds.h
mgmtd/mgmt_history.c