diff options
| author | 2020-11-03 21:38:50 +0000 | |
|---|---|---|
| committer | 2020-11-03 21:40:05 +0000 | |
| commit | b61bc2b26315c1428eb7493683e75841268b2e74 (patch) | |
| tree | 68647e2d35b8485f46132a409b55bd5d02abaa77 /src/modules/m_sqloper.cpp | |
| parent | Fix inconsistencies with FilePosition and column counting. (diff) | |
Store the SQL row id in the synthesised sqloper config tags.
Diffstat (limited to 'src/modules/m_sqloper.cpp')
| -rw-r--r-- | src/modules/m_sqloper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<std::string> cols; res.GetCols(cols); // Create the oper tag as if we were the conf file. - auto tag = std::make_shared<ConfigTag>("oper", FilePosition("<" MODNAME ">", 0, 0)); + auto tag = std::make_shared<ConfigTag>("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. |
