Module: sip-router
Branch: master
Commit: 119ad6aa83a6efed0ffc71eea477e4b5cfbea73b
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=119ad6a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Sep 29 10:18:01 2011 +0200
core: added defines for positive child ranks
- PROC_SIPINIT 1 - some modules do specific processing in this child
only, like usrloc loading records from db
- PROC_SIPRPC 127 - special positive rank to use in RPC workers to init
the environment for processing SIP-specific commands. For example,
event_route[tm:local-request] can be executed due to MI/RPC command
and have insite SIP related functions from other modules which need db
connection, like acc_db_request()
---
sr_module.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/sr_module.h b/sr_module.h
index 71ffa92..ce8c781 100644
--- a/sr_module.h
+++ b/sr_module.h
@@ -204,6 +204,13 @@ typedef int (*param_func_t)( modparam_t type, void* val);
#define PROC_NOCHLDINIT -128 /**< no child init functions will be called
if this rank is used in fork_process() */
+#define PROC_SIPINIT 1 /**< First SIP worker - some modules do special
+ processing in this child, like loading db data */
+#define PROC_SIPRPC 127 /**< Used to init RPC worker as SIP commands
+ handler. Don't do any special processing in the
+ child init with this rank - just bare child
+ initialization */
+
#define PROC_MIN PROC_NOCHLDINIT /**< Minimum process rank */