Browse Source

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()
Daniel-Constantin Mierla 14 years ago
parent
commit
119ad6aa83
1 changed files with 7 additions and 0 deletions
  1. 7 0
      sr_module.h

+ 7 - 0
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 */