[sr-dev] git:master: debugger: safety check for pid list

Daniel-Constantin Mierla miconda at gmail.com
Fri Jun 10 11:22:11 CEST 2011


Module: sip-router
Branch: master
Commit: 35ef4b0d8f85f1e902e0d99d513f311ebd39bc6d
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=35ef4b0d8f85f1e902e0d99d513f311ebd39bc6d

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Fri Jun 10 11:19:44 2011 +0200

debugger: safety check for pid list

- some event route blocks can be executed before all children
  initialization and the internal pid list structure is not created,
  disable debugging in this case

---

 modules/debugger/debugger_api.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/debugger/debugger_api.c b/modules/debugger/debugger_api.c
index 5b4ff58..7fbfd0d 100644
--- a/modules/debugger/debugger_api.c
+++ b/modules/debugger/debugger_api.c
@@ -240,7 +240,7 @@ int dbg_cfg_trace(void *data)
 	a = (struct action *)srevp[0];
 	msg = (struct sip_msg *)srevp[1];
 
-	if(a==NULL || msg==NULL)
+	if(a==NULL || msg==NULL || _dbg_pid_list==NULL)
 		return 0;
 
 	an = dbg_get_action_name(a);




More information about the sr-dev mailing list