From b61bc2b26315c1428eb7493683e75841268b2e74 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 3 Nov 2020 21:38:50 +0000 Subject: Store the SQL row id in the synthesised sqloper config tags. --- src/modules/m_sqloper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_sqloper.cpp') diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp index a42b5c7f5..dad5edee0 100644 --- a/src/modules/m_sqloper.cpp +++ b/src/modules/m_sqloper.cpp @@ -64,13 +64,13 @@ class OperQuery : public SQL::Query SQL::Row row; // Iterate through DB results to create oper blocks from sqloper rows - while (res.GetRow(row)) + for (size_t rowidx = 1; res.GetRow(row); ++rowidx) { std::vector cols; res.GetCols(cols); // Create the oper tag as if we were the conf file. - auto tag = std::make_shared("oper", FilePosition("<" MODNAME ">", 0, 0)); + auto tag = std::make_shared("oper", FilePosition("<" MODNAME ">" , rowidx, 0)); /** Iterate through each column in the SQLOpers table. An infinite number of fields can be specified. * Column 'x' with cell value 'y' will be the same as x=y in an OPER block in opers.conf. -- cgit v1.3.1-10-gc9f91