Browse Source

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
Daniel-Constantin Mierla 9 years ago
parent
commit
e70283a0b6
1 changed files with 3 additions and 2 deletions
  1. 3 2
      modules/cdp/session.c

+ 3 - 2
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);