Browse code

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 authored on 29/09/2011 08:18:01
Showing 1 changed files
... ...
@@ -204,6 +204,13 @@ typedef int (*param_func_t)( modparam_t type, void* val);
204 204
 #define PROC_NOCHLDINIT -128 /**< no child init functions will be called
205 205
                                 if this rank is used in fork_process() */
206 206
 
207
+#define PROC_SIPINIT      1  /**< First SIP worker - some modules do special
208
+							 processing in this child, like loading db data */
209
+#define PROC_SIPRPC       127  /**< Used to init RPC worker as SIP commands
210
+							   handler. Don't do any special processing in the
211
+							   child init with this rank - just bare child
212
+							   initialization */
213
+
207 214
 #define PROC_MIN PROC_NOCHLDINIT /**< Minimum process rank */
208 215
 
209 216