Module: kamailio
Branch: master
Commit: e70283a0b6010e4a4c567a50b9008e0d7c1e27d5
URL:
https://github.com/kamailio/kamailio/commit/e70283a0b6010e4a4c567a50b9008e0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-05-05T07:47:36+02:00
cdp: use the function to check if it is shutdown phase
- global variable is not accessible directly, breaking the build - issue
introduced with previous commit
---
Modified: modules/cdp/session.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e70283a0b6010e4a4c567a50b9008e0…
Patch:
https://github.com/kamailio/kamailio/commit/e70283a0b6010e4a4c567a50b9008e0…
---
diff --git a/modules/cdp/session.c b/modules/cdp/session.c
index 4c7b0bc..941acf5 100644
--- a/modules/cdp/session.c
+++ b/modules/cdp/session.c
@@ -47,6 +47,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "../../sr_module.h"
#include "session.h"
#include "diameter.h"
#include "config.h"
@@ -73,7 +74,7 @@ unsigned int *session_id2; /**< counter for second part of the
session id */
*/
inline void AAASessionsLock(unsigned int hash)
{
- if(_sr_destroy_modules_phase==1) return;
+ if(destroy_modules_phase()) return;
if ( hash >=0 && hash < sessions_hash_size ){
lock_get(sessions[hash].lock);
}
@@ -87,7 +88,7 @@ inline void AAASessionsLock(unsigned int hash)
*/
inline void AAASessionsUnlock(unsigned int hash)
{
- if(_sr_destroy_modules_phase==1) return;
+ if(destroy_modules_phase()) return;
if ( hash >=0 && hash < sessions_hash_size ){
lock_release(sessions[hash].lock);