From bda0c0b013c10b4109ab5fd05895ca0178d8f7e5 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Tue, 29 Mar 2016 16:07:10 +0300 Subject: [PATCH] Fixed dbfwfilter rule parser build failure The rule parser used old log manager initialization calls and looked for the source files in the wrong place. --- server/modules/filter/CMakeLists.txt | 7 ------- server/modules/filter/dbfwfilter/CMakeLists.txt | 7 +++++++ server/modules/filter/dbfwfilter/dbfwfilter.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/server/modules/filter/CMakeLists.txt b/server/modules/filter/CMakeLists.txt index 06c35e05c..b349e1574 100644 --- a/server/modules/filter/CMakeLists.txt +++ b/server/modules/filter/CMakeLists.txt @@ -60,13 +60,6 @@ if(BUILD_SLAVELAG) install(TARGETS slavelag DESTINATION ${MAXSCALE_LIBDIR}) endif() -if(BUILD_TOOLS) - add_executable(ruleparser dbfwfilter.c) - target_compile_definitions(ruleparser PUBLIC "BUILD_RULE_PARSER") - target_link_libraries(ruleparser maxscale-common) - install(TARGETS ruleparser DESTINATION ${MAXSCALE_BINDIR}) -endif() - add_subdirectory(hint) add_subdirectory(dbfwfilter) diff --git a/server/modules/filter/dbfwfilter/CMakeLists.txt b/server/modules/filter/dbfwfilter/CMakeLists.txt index 787d0fbd7..665467c3a 100644 --- a/server/modules/filter/dbfwfilter/CMakeLists.txt +++ b/server/modules/filter/dbfwfilter/CMakeLists.txt @@ -10,6 +10,13 @@ if(BISON_FOUND AND FLEX_FOUND) target_link_libraries(dbfwfilter maxscale-common) set_target_properties(dbfwfilter PROPERTIES VERSION "1.0.0") install(TARGETS dbfwfilter DESTINATION ${MAXSCALE_LIBDIR}) + + if(BUILD_TOOLS) + add_executable(dbfwruleparser dbfwfilter.c ${BISON_ruleparser_OUTPUTS} ${FLEX_token_OUTPUTS}) + target_compile_definitions(dbfwruleparser PUBLIC "BUILD_RULE_PARSER") + target_link_libraries(dbfwruleparser maxscale-common) + install(TARGETS dbfwruleparser DESTINATION ${MAXSCALE_BINDIR}) + endif() else() message(FATAL_ERROR "Could not find Bison or Flex: ${BISON_EXECUTABLE} ${FLEX_EXECUTABLE}") endif() diff --git a/server/modules/filter/dbfwfilter/dbfwfilter.c b/server/modules/filter/dbfwfilter/dbfwfilter.c index f081beadc..28eca829d 100644 --- a/server/modules/filter/dbfwfilter/dbfwfilter.c +++ b/server/modules/filter/dbfwfilter/dbfwfilter.c @@ -2243,7 +2243,7 @@ int main(int argc, char** argv) NULL }; - mxs_log_init(argc_, argv_); + mxs_log_init(NULL, NULL, MXS_LOG_TARGET_DEFAULT); init_test_env(home);