Module: kamailio
Branch: master
Commit: a08da7b34b01f4b0a579fbfdc141bf2944613736
URL: https://github.com/kamailio/kamailio/commit/a08da7b34b01f4b0a579fbfdc141bf2…
Author: Xenofon Karamanos <xk(a)gilawa.com>
Committer: Xenofon Karamanos <xk(a)gilawa.com>
Date: 2024-12-10T14:39:03Z
cmake: Use evaluated full paths from cmake for correct handling of special cases
---
Modified: cmake/defs.cmake
---
Diff: https://github.com/kamailio/kamailio/commit/a08da7b34b01f4b0a579fbfdc141bf2…
Patch: https://github.com/kamailio/kamailio/commit/a08da7b34b01f4b0a579fbfdc141bf2…
---
diff --git a/cmake/defs.cmake b/cmake/defs.cmake
index 4214ef57121..bb9a0b680a7 100644
--- a/cmake/defs.cmake
+++ b/cmake/defs.cmake
@@ -6,8 +6,6 @@ cmake_minimum_required(VERSION 3.10)
add_library(common INTERFACE)
-message(STATUS "CMAKE_C_COMPILER_VERSION: ${CMAKE_C_COMPILER_VERSION}")
-
set(OS ${CMAKE_SYSTEM_NAME})
message(STATUS "OS: ${OS}")
@@ -109,6 +107,10 @@ if(NOT ${LIBSSL_SET_MUTEX_SHARED})
STATUS
"Checking if can enable workaround for libssl 1.1+ to set shared mutex attribute"
)
+
+ # TODO: This can probably be reduced to a just a find_package(OpenSSL) call
+ # and then check the version
+ # If we are cross-compiling, cmake should search for library on the target or both target/host
if(NOT DEFINED CMAKE_CROSSCOMPILING OR NOT ${CMAKE_CROSSCOMPILING})
message(STATUS "Checking for OpenSSL 1.1.0")
find_package(OpenSSL 1.1.0)
@@ -306,11 +308,11 @@ target_compile_definitions(
${TARGET_ARCH}
__OS_${OS_LOWER}
VERSIONVAL=${VERSIONVAL}
- CFG_DIR="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_SYSCONFDIR}/${CFG_NAME}/"
- SHARE_DIR="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${MAIN_NAME}/"
+ CFG_DIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}/${CFG_NAME}/"
+ SHARE_DIR="${CMAKE_INSTALL_FULL_DATADIR}/${MAIN_NAME}/"
# Absolute path this run is always /var/run/kamailio either for local or
# system installs
- RUN_DIR="/${CMAKE_INSTALL_LOCALSTATEDIR}/run/${MAIN_NAME}"
+ RUN_DIR="${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run/${MAIN_NAME}"
${LOCK_METHOD}
# Module stuff?
PIC
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to issue #4041
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4059
-- Commit Summary --
* cmake: Link internal libraries to core and remove them from modules
-- File Changes --
M src/CMakeLists.txt (4)
M src/lib/CMakeLists.txt (2)
M src/lib/ims/CMakeLists.txt (2)
M src/lib/srdb1/CMakeLists.txt (2)
M src/lib/srdb2/CMakeLists.txt (2)
M src/lib/trie/CMakeLists.txt (2)
M src/modules/acc/CMakeLists.txt (2)
M src/modules/alias_db/CMakeLists.txt (2)
M src/modules/auth_db/CMakeLists.txt (2)
M src/modules/avpops/CMakeLists.txt (1)
M src/modules/carrierroute/CMakeLists.txt (1)
M src/modules/cfg_db/CMakeLists.txt (1)
M src/modules/cnxcc/CMakeLists.txt (2)
M src/modules/cplc/CMakeLists.txt (2)
M src/modules/db2_ldap/CMakeLists.txt (1)
M src/modules/db2_ops/CMakeLists.txt (1)
M src/modules/db_berkeley/CMakeLists.txt (1)
M src/modules/db_cluster/CMakeLists.txt (1)
M src/modules/db_flatstore/CMakeLists.txt (1)
M src/modules/db_mongodb/CMakeLists.txt (1)
M src/modules/db_oracle/CMakeLists.txt (1)
M src/modules/db_perlvdb/CMakeLists.txt (1)
M src/modules/db_postgres/CMakeLists.txt (1)
M src/modules/db_redis/CMakeLists.txt (1)
M src/modules/db_sqlite/CMakeLists.txt (2)
M src/modules/db_text/CMakeLists.txt (2)
M src/modules/db_unixodbc/CMakeLists.txt (2)
M src/modules/dialog/CMakeLists.txt (1)
M src/modules/dialplan/CMakeLists.txt (1)
M src/modules/dispatcher/CMakeLists.txt (1)
M src/modules/dmq/CMakeLists.txt (1)
M src/modules/domain/CMakeLists.txt (1)
M src/modules/domainpolicy/CMakeLists.txt (1)
M src/modules/drouting/CMakeLists.txt (1)
M src/modules/group/CMakeLists.txt (1)
M src/modules/htable/CMakeLists.txt (1)
M src/modules/imc/CMakeLists.txt (1)
M src/modules/ims_auth/CMakeLists.txt (2)
M src/modules/ims_charging/CMakeLists.txt (1)
M src/modules/ims_dialog/CMakeLists.txt (1)
M src/modules/ims_diameter_server/CMakeLists.txt (1)
M src/modules/ims_icscf/CMakeLists.txt (1)
M src/modules/ims_ipsec_pcscf/CMakeLists.txt (1)
M src/modules/ims_isc/CMakeLists.txt (1)
M src/modules/ims_ocs/CMakeLists.txt (1)
M src/modules/ims_qos/CMakeLists.txt (1)
M src/modules/ims_qos_npn/CMakeLists.txt (1)
M src/modules/ims_usrloc_pcscf/CMakeLists.txt (1)
M src/modules/ims_usrloc_scscf/CMakeLists.txt (1)
M src/modules/kazoo/CMakeLists.txt (1)
M src/modules/keepalive/CMakeLists.txt (1)
M src/modules/lcr/CMakeLists.txt (1)
M src/modules/matrix/CMakeLists.txt (1)
M src/modules/mohqueue/CMakeLists.txt (1)
M src/modules/mqueue/CMakeLists.txt (1)
M src/modules/msilo/CMakeLists.txt (1)
M src/modules/mtree/CMakeLists.txt (1)
M src/modules/p_usrloc/CMakeLists.txt (1)
M src/modules/pdt/CMakeLists.txt (1)
M src/modules/permissions/CMakeLists.txt (1)
M src/modules/pipelimit/CMakeLists.txt (1)
M src/modules/prefix_route/CMakeLists.txt (1)
M src/modules/presence/CMakeLists.txt (1)
M src/modules/presence_xml/CMakeLists.txt (1)
M src/modules/pua/CMakeLists.txt (1)
M src/modules/rls/CMakeLists.txt (1)
M src/modules/rtpengine/CMakeLists.txt (1)
M src/modules/rtpproxy/CMakeLists.txt (1)
M src/modules/sca/CMakeLists.txt (1)
M src/modules/secfilter/CMakeLists.txt (1)
M src/modules/sipcapture/CMakeLists.txt (1)
M src/modules/siptrace/CMakeLists.txt (1)
M src/modules/siputils/CMakeLists.txt (1)
M src/modules/speeddial/CMakeLists.txt (1)
M src/modules/sqlops/CMakeLists.txt (1)
M src/modules/topos/CMakeLists.txt (1)
M src/modules/uac/CMakeLists.txt (1)
M src/modules/uid_auth_db/CMakeLists.txt (1)
M src/modules/uid_avp_db/CMakeLists.txt (1)
M src/modules/uid_domain/CMakeLists.txt (1)
M src/modules/uid_gflags/CMakeLists.txt (1)
M src/modules/uid_uri_db/CMakeLists.txt (1)
M src/modules/uri_db/CMakeLists.txt (1)
M src/modules/userblocklist/CMakeLists.txt (1)
M src/modules/usrloc/CMakeLists.txt (1)
M src/modules/utils/CMakeLists.txt (1)
M src/modules/xcap_client/CMakeLists.txt (1)
M src/modules/xcap_server/CMakeLists.txt (1)
M src/modules/xhttp/CMakeLists.txt (2)
M src/modules/xhttp_pi/CMakeLists.txt (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4059.patchhttps://github.com/kamailio/kamailio/pull/4059.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4059
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4059(a)github.com>
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to issue #4019
#### Description
I assume that the crash #4019 happens, because of an issue in libcurl, namely in the `event_cb` function ([in this line](https://github.com/kamailio/kamailio/blob/master/src/modules/http_asy…) kamailio removes the pointer to the `cell` object (which was attached to this `g->multi` curl descriptor earlier), and the `cell` object memory is released [at this line](https://github.com/kamailio/kamailio/blob/master/src/modules/http_asy…. However, the crash happens when `event_cb` is called when `curl_multi_remove_handle` is called [at this line](https://github.com/kamailio/kamailio/blob/master/src/modules/http_asy….
In this fix `cell` object is retrieved from the corresponding CURL descriptor and then it's compared with the `cell` object passed to this callback.
With this change when this issue happens the `cell` object, which is retrieved from the corresponding CURL descriptor, is NULL pointer, because it was removed earlier [in this line](https://github.com/kamailio/kamailio/blob/master/src/modules/http_asy…, so the crash should not appear.
However it might be fixed in other way, namely we may not to pass `cell` to the `event_cb` callback and always retrieve it from CURL descriptor. I would appreciate if developers comment that.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4020
-- Commit Summary --
* http_async_client: fixed crash on curl callback
-- File Changes --
M src/modules/http_async_client/http_multi.c (18)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4020.patchhttps://github.com/kamailio/kamailio/pull/4020.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4020
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4020(a)github.com>