Module: sip-router
Branch: jason.penton/kamailio_ims_extensions
Commit: 67a2fa291afaf77ebc12262a868d510bbed299a3
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=67a2fa2…
Author: Jason Penton <jason.penton(a)gmail.com>
Committer: Jason Penton <jason.penton(a)gmail.com>
Date: Tue Oct 25 11:03:36 2011 +0200
CDP: fixed logging inconsistencies
---
modules/cdp/acceptor.c | 2 +-
modules/cdp/globals.c | 30 ++++--------------------------
modules/cdp/globals.h | 10 ----------
modules/cdp/peermanager.c | 2 +-
modules/cdp/receiver.c | 4 ++--
modules/cdp/tcp_accept.c | 2 +-
modules/cdp/timer.c | 2 +-
modules/cdp/transaction.c | 2 +-
modules/cdp/worker.c | 2 +-
9 files changed, 12 insertions(+), 44 deletions(-)
diff --git a/modules/cdp/acceptor.c b/modules/cdp/acceptor.c
index 75dd693..1ff581c 100644
--- a/modules/cdp/acceptor.c
+++ b/modules/cdp/acceptor.c
@@ -113,7 +113,7 @@ void acceptor_process(dp_config *cfg)
#else
#ifdef PKG_MALLOC
#ifdef PKG_MALLOC
- LOG(memlog, "Acceptor Memory status (pkg):\n");
+ LOG(L_DBG, "Acceptor Memory status (pkg):\n");
//pkg_status();
#ifdef pkg_sums
pkg_sums();
diff --git a/modules/cdp/globals.c b/modules/cdp/globals.c
index 0e9aa6a..32eea31 100644
--- a/modules/cdp/globals.c
+++ b/modules/cdp/globals.c
@@ -57,28 +57,6 @@
#include "globals.h"
#include "utils.h"
-#ifdef CDP_FOR_SER
-
-#else
-
-#ifdef WHARF
-
-#else
-
- unsigned long shm_mem_size = SHM_MEM_SIZE;
- int memlog = L_ERR;
- int memdbg = L_DBG;
- int debug = L_DBG;
- int log_facility = 1;
- int log_stderr = 1;
- int process_no=0;
-
-#endif
-
-#endif
-
-
-
//str aaa_fqdn={"unset_fqdn",10};
//str aaa_realm={"unset_realm",11};
//str aaa_identity={"unset_identity",14};
@@ -90,7 +68,7 @@ int init_memory(int show_status)
if (init_pkg_mallocs()==-1)
goto error;
if (show_status){
- LOG(memlog, "Memory status (pkg):\n");
+ LOG(L_DBG, "Memory status (pkg):\n");
pkg_status();
}
#endif
@@ -104,7 +82,7 @@ int init_memory(int show_status)
)==-1)
goto error;
if (show_status){
- LOG(memlog, "Memory status (shm):\n");
+ LOG(L_DBG, "Memory status (shm):\n");
shm_status();
}
#endif
@@ -123,7 +101,7 @@ void destroy_memory(int show_status)
allow an almost gracious shutdown */
#ifdef SHM_MEM
if (show_status){
- LOG(memlog, "Memory status (shm):\n");
+ LOG(L_DBG, "Memory status (shm):\n");
//shm_status();
#ifndef SER_MOD_INTERFACE
shm_sums();
@@ -138,7 +116,7 @@ void destroy_memory(int show_status)
#endif
#ifdef PKG_MALLOC
if (show_status){
- LOG(memlog, "Memory status (pkg):\n");
+ LOG(L_DBG, "Memory status (pkg):\n");
//pkg_status();
#ifndef SER_MOD_INTERFACE
pkg_sums();
diff --git a/modules/cdp/globals.h b/modules/cdp/globals.h
index 4749c5e..aa3c31d 100644
--- a/modules/cdp/globals.h
+++ b/modules/cdp/globals.h
@@ -62,16 +62,6 @@
#define DPNAME "CDiameterPeer"
#define DPVERSION "0.0.2"
-
-#define L_MEM L_DBG
-
-
-#ifdef CDP_FOR_SER
-#else
-extern unsigned long shm_mem_size;
-extern int memlog;
-#endif
-
extern int process_no;
int init_memory(int show_status);
diff --git a/modules/cdp/peermanager.c b/modules/cdp/peermanager.c
index 09f6edc..8d2f43e 100644
--- a/modules/cdp/peermanager.c
+++ b/modules/cdp/peermanager.c
@@ -272,7 +272,7 @@ int peer_timer(time_t now,void *ptr)
{
peer *p,*n;
int i;
- LOG(L_MEM,"DBG:peer_timer(): taking care of peers...\n");
+ LOG(L_DBG,"DBG:peer_timer(): taking care of peers...\n");
lock_get(peer_list_lock);
p = peer_list->head;
while(p){
diff --git a/modules/cdp/receiver.c b/modules/cdp/receiver.c
index b45f3d7..585b80a 100644
--- a/modules/cdp/receiver.c
+++ b/modules/cdp/receiver.c
@@ -495,7 +495,7 @@ done:
#else
#ifdef PKG_MALLOC
#ifdef PKG_MALLOC
- LOG(memlog, "Receiver[%.*s] Memory status (pkg):\n",
+ LOG(L_DBG, "Receiver[%.*s] Memory status (pkg):\n",
p?p->fqdn.len:0,p?p->fqdn.s:0);
//pkg_status();
#ifdef pkg_sums
@@ -663,7 +663,7 @@ int receive_loop(peer *original_peer)
while(!n){
if (shutdownx&&*shutdownx) break;
- log_serviced_peers(L_MEM);
+ log_serviced_peers(L_DBG);
max =-1;
diff --git a/modules/cdp/tcp_accept.c b/modules/cdp/tcp_accept.c
index 9a7e964..84e8798 100644
--- a/modules/cdp/tcp_accept.c
+++ b/modules/cdp/tcp_accept.c
@@ -225,7 +225,7 @@ void accept_loop()
nready = select( max_sock+1, &listen_set, 0, 0, &timeout);
if (nready == 0){
- LOG(L_MEM,"DBG:accept_loop(): No connection attempts\n");
+ LOG(L_DBG,"DBG:accept_loop(): No connection attempts\n");
continue;
}
if (nready == -1) {
diff --git a/modules/cdp/timer.c b/modules/cdp/timer.c
index 9e75f9d..75b43ee 100644
--- a/modules/cdp/timer.c
+++ b/modules/cdp/timer.c
@@ -219,7 +219,7 @@ void timer_process(int returns)
#else
#ifdef PKG_MALLOC
#ifdef PKG_MALLOC
- LOG(memlog, "Timer Memory status (pkg):\n");
+ LOG(L_DBG, "Timer Memory status (pkg):\n");
//pkg_status();
#ifdef pkg_sums
pkg_sums();
diff --git a/modules/cdp/transaction.c b/modules/cdp/transaction.c
index 27f9803..3b39496 100644
--- a/modules/cdp/transaction.c
+++ b/modules/cdp/transaction.c
@@ -199,7 +199,7 @@ inline void cdp_free_trans(cdp_trans_t *x)
int cdp_trans_timer(time_t now, void* ptr)
{
cdp_trans_t *x,*n;
- LOG(L_MEM,"DBG:trans_timer(): taking care of diameter transactions...\n");
+ LOG(L_DBG,"DBG:trans_timer(): taking care of diameter transactions...\n");
lock_get(trans_list->lock);
x = trans_list->head;
while(x)
diff --git a/modules/cdp/worker.c b/modules/cdp/worker.c
index 026d279..fbb55ec 100644
--- a/modules/cdp/worker.c
+++ b/modules/cdp/worker.c
@@ -409,7 +409,7 @@ void worker_process(int id)
#ifdef CDP_FOR_SER
#else
#ifdef PKG_MALLOC
- LOG(memlog, "Worker[%d] Memory status (pkg):\n",id);
+ LOG(L_DBG, "Worker[%d] Memory status (pkg):\n",id);
//pkg_status();
#ifdef pkg_sums
pkg_sums();