Fix version check

This commit is contained in:
Felipe Zimmerle 2020-03-24 17:15:04 -03:00
parent 6367e6d5e9
commit f1d22f9b02
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277
3 changed files with 4 additions and 4 deletions

View File

@ -198,9 +198,9 @@ namespace modsecurity {
MODSECURITY_MINOR "." MODSECURITY_PATCHLEVEL \
MODSECURITY_TAG
#define MODSECURITY_VERSION_NUM MODSECURITY_MAJOR \
MODSECURITY_MINOR MODSECURITY_PATCHLEVEL MODSECURITY_TAG_NUM
#define MODSECURITY_VERSION_NUM 3040100
#define MODSECURITY_CHECK_VERSION(a) (MODSECURITY_VERSION_NUM <= a)
/*
* @name ModSecLogCb

View File

@ -44,8 +44,8 @@ pkginclude_HEADERS = \
../headers/modsecurity/rule.h \
../headers/modsecurity/rules.h \
../headers/modsecurity/rule_message.h \
../headers/modsecurity/rules.h \
../headers/modsecurity/rules_set.h \
../headers/modsecurity/rules_set_phases.h \
../headers/modsecurity/rules_set_properties.h \
../headers/modsecurity/rules_exceptions.h \
../headers/modsecurity/transaction.h \

View File

@ -64,7 +64,7 @@ bool HttpsClient::download(const std::string &uri) {
CURL *curl;
CURLcode res;
std::string uniqueId = "ModSec-unique-id: " + UniqueId::uniqueId();
std::string status = "ModSec-status: " MODSECURITY_VERSION_NUM;
std::string status = "ModSec-status: " + std::to_string(MODSECURITY_VERSION_NUM);
curl = curl_easy_init();
if (!curl) {