Commit d5d248a8 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fixed plugin not loading because of unexpected flexisip API version

parent e28a5d26
Pipeline #2134 passed with stages
in 39 minutes and 18 seconds
......@@ -43,7 +43,7 @@ flexisip-config.h
ltmain.sh
scripts/flexisip.conf.sample
stamp-h1
/src/flexisip_gitversion.h
/include/flexisip/flexisip-version.h
/src/test/expr
src/libhack.a
build-debian/
......
......@@ -174,6 +174,7 @@ rm -rf $RPM_BUILD_ROOT
%{_datarootdir}/*
%dir %{_includedir}/flexisip
%{_includedir}/flexisip/*.hh
%{_includedir}/flexisip/*.h
%{_localstatedir}/*
%if @ENABLE_PRESENCE@
......
......@@ -28,6 +28,7 @@ set(HEADER_FILES
eventlogs.hh
expressionparser.hh
flexisip-exception.hh
flexisip-version.h
forkbasiccontext.hh
forkcallcontext.hh
forkcontext.hh
......@@ -42,6 +43,12 @@ set(HEADER_FILES
transaction.hh
)
find_package(Git)
add_custom_target(flexisip-git-version
COMMAND ${CMAKE_COMMAND} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -DFLEXISIP_VERSION=${FLEXISIP_VERSION} -DWORK_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_LIST_DIR}/flexisip -P ${CMAKE_CURRENT_SOURCE_DIR}/gitversion.cmake
BYPRODUCTS "${CMAKE_CURRENT_LIST_DIR}/flexisip/flexisip-version.h"
)
set(FLEXISIP_HEADER_FILES )
foreach(HEADER_FILE ${HEADER_FILES})
list(APPEND FLEXISIP_HEADER_FILES "${CMAKE_CURRENT_LIST_DIR}/flexisip/${HEADER_FILE}")
......
......@@ -19,6 +19,7 @@
#pragma once
#include <flexisip/module.hh>
#include <flexisip/flexisip-version.h>
#ifndef FLEXISIP_GIT_VERSION
#define FLEXISIP_GIT_VERSION "undefined"
......
......@@ -45,10 +45,10 @@ if(GIT_DESCRIBE)
message(FATAL_ERROR "FLEXISIP_VERSION and git tag differ. Please put them identical.")
endif()
set(GIT_VERSION "${GIT_DESCRIBE}")
configure_file("${WORK_DIR}/gitversion.h.in" "${OUTPUT_DIR}/flexisip_gitversion.h" @ONLY)
configure_file("${WORK_DIR}/gitversion.h.in" "${OUTPUT_DIR}/flexisip-version.h" @ONLY)
elseif(GIT_REVISION)
set(GIT_VERSION "${FLEXISIP_VERSION}_${GIT_REVISION}")
configure_file("${WORK_DIR}/gitversion.h.in" "${OUTPUT_DIR}/flexisip_gitversion.h" @ONLY)
elseif(NOT EXISTS "${OUTPUT_DIR}/flexisip_gitversion.h")
file(WRITE "${OUTPUT_DIR}/flexisip_gitversion.h" "")
configure_file("${WORK_DIR}/gitversion.h.in" "${OUTPUT_DIR}/flexisip-version.h" @ONLY)
elseif(NOT EXISTS "${OUTPUT_DIR}/flexisip-version.h")
file(WRITE "${OUTPUT_DIR}/flexisip-version.h" "")
endif()
......@@ -110,12 +110,6 @@ set(FLEXISIP_SOURCES
utils/threadpool.cc
)
find_package(Git)
add_custom_target(flexisip-git-version
COMMAND ${CMAKE_COMMAND} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -DFLEXISIP_VERSION=${FLEXISIP_VERSION} -DWORK_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/gitversion.cmake
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/flexisip_gitversion.h"
)
list(APPEND FLEXISIP_INCLUDES ${FLEXISIP_HEADER_DIR} ${BCTOOLBOX_INCLUDE_DIRS} ${BELR_INCLUDE_DIRS})
if(LIBXSD_FOUND)
......
......@@ -58,7 +58,7 @@
#define VERSION "DEVEL"
#endif // VERSION
#include "flexisip_gitversion.h"
#include <flexisip/flexisip-version.h>
#ifndef FLEXISIP_GIT_VERSION
#define FLEXISIP_GIT_VERSION "undefined"
#endif
......
......@@ -25,7 +25,6 @@
#include <sofia-sip/sip_header.h>
#include <sofia-sip/sip_status.h>
#include "flexisip_gitversion.h"
#include <flexisip/plugin.hh>
#include "module-external-authentication.hh"
......
......@@ -27,7 +27,6 @@ extern "C" {
#include <flexisip/agent.hh>
#include "module-auth.hh"
#include "flexisip_gitversion.h"
#include <flexisip/plugin.hh>
// =============================================================================
......
......@@ -19,7 +19,7 @@
#include <unordered_map>
#include "plugin-loader.hh"
#include "flexisip_gitversion.h"
#include <flexisip/flexisip-version.h>
#include <flexisip/plugin.hh>
// =============================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment