Browse code

- remove some empty child_init functions, they are not needed - extend log in core to also output the child pid - the DBG logging that was present in some child_init(s) is now also present in the core, so now functionality/ debugging output is lost

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4831 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt authored on 04/09/2008 11:26:47
Showing 7 changed files
... ...
@@ -66,10 +66,6 @@ int bm_log_timer(struct sip_msg* _msg, char* timer, char* mystr);
66 66
  */
67 67
 static void destroy(void);
68 68
 
69
-/*
70
- * Module child-init function prototype
71
- */
72
-static int child_init(int rank);
73 69
 
74 70
 /*
75 71
  * Module initialization function prototype
... ...
@@ -174,7 +170,7 @@ struct module_exports exports = {
174 170
 	mod_init,   /* module initialization function */
175 171
 	0,          /* response function */
176 172
 	destroy,    /* destroy function */
177
-	child_init  /* child initialization function */
173
+	0           /* child initialization function */
178 174
 };
179 175
 
180 176
 
... ...
@@ -198,11 +194,6 @@ static int mod_init(void) {
198 194
 	return ret;
199 195
 }
200 196
 
201
-static int child_init(int rank)
202
-{
203
-	LM_INFO("initing child...\n");
204
-	return 0;
205
-}
206 197
 
207 198
 /*
208 199
  * destroy
... ...
@@ -71,10 +71,6 @@ struct sl_binds slb;
71 71
  */
72 72
 static void destroy(void);
73 73
 
74
-/*
75
- * Module child-init function prototype
76
- */
77
-static int child_init(int rank);
78 74
 
79 75
 /*
80 76
  * Module initialization function prototype
... ...
@@ -162,15 +158,10 @@ struct module_exports exports = {
162 158
 	mod_init,   /* module initialization function */
163 159
 	0,          /* response function */
164 160
 	destroy,    /* destroy function */
165
-	child_init  /* child initialization function */
161
+	0           /* child initialization function */
166 162
 };
167 163
 
168 164
 
169
-static int child_init(int rank)
170
-{
171
-	return 0;
172
-}
173
-
174 165
 
175 166
 EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);
176 167
 EXTERN_C void boot_OpenSER(pTHX_ CV* cv);
... ...
@@ -329,8 +329,6 @@ static int mod_init(void)
329 329
  */
330 330
 static int child_init(int rank)
331 331
 {
332
-	LM_NOTICE("init_child [%d]  pid [%d]\n", rank, getpid());
333
-
334 332
 	pid = my_pid();
335 333
 	
336 334
 	if(use_db== 0)
... ...
@@ -51,7 +51,6 @@ pua_api_t pua;
51 51
 /** module functions */
52 52
 
53 53
 static int mod_init(void);
54
-static int child_init(int);
55 54
 static void destroy(void);
56 55
 
57 56
 send_publish_t pua_send_publish;
... ...
@@ -79,7 +78,7 @@ struct module_exports exports= {
79 78
 	 mod_init,					/* module initialization function */
80 79
 	 (response_function) 0,		/* response handling function */
81 80
  	 destroy,					/* destroy function */
82
-	 child_init                 /* per-child init function */
81
+	 0                          /* per-child init function */
83 82
 };
84 83
 	
85 84
 /**
... ...
@@ -125,12 +124,6 @@ static int mod_init(void)
125 124
 	return 0;
126 125
 }
127 126
 
128
-static int child_init(int rank)
129
-{
130
-	LM_DBG("child [%d]  pid [%d]\n", rank, getpid());
131
-	return 0;
132
-}	
133
-
134 127
 static void destroy(void)
135 128
 {	
136 129
 	LM_DBG("destroying module ...\n");
... ...
@@ -193,7 +193,6 @@ static regex_t queue_params_regex;
193 193
 
194 194
 /** module functions */
195 195
 static int mod_init(void);
196
-static int child_init(int);
197 196
 static void rl_timer(unsigned int, void *);
198 197
 static int w_rl_check_default(struct sip_msg*, char *, char *);
199 198
 static int w_rl_check_forced(struct sip_msg*, char *, char *);
... ...
@@ -266,7 +265,7 @@ struct module_exports exports= {
266 265
 	mod_init,			/* module initialization function */
267 266
 	(response_function) 0,
268 267
 	(destroy_function) destroy,	/* module exit function */
269
-	child_init			/* per-child init function */
268
+	0				/* per-child init function */
270 269
 };
271 270
 
272 271
 
... ...
@@ -563,12 +562,6 @@ static int mod_init(void)
563 562
 	return 0;
564 563
 }
565 564
 
566
-/* generic openSER module functions */
567
-static int child_init(int rank)
568
-{
569
-	LM_DBG("# %d / pid <%d>\n", rank, getpid());
570
-	return 0;
571
-}
572 565
 
573 566
 void destroy(void)
574 567
 {
... ...
@@ -53,7 +53,6 @@ MODULE_VERSION
53 53
 #define XCAP_TABLE_VERSION   3
54 54
 
55 55
 static int mod_init(void);
56
-static int child_init(int);
57 56
 void destroy(void);
58 57
 struct mi_root* refreshXcapDoc(struct mi_root* cmd, void* param);
59 58
 int get_auid_flag(str auid);
... ...
@@ -113,7 +112,7 @@ struct module_exports exports= {
113 112
 	mod_init,					/* module initialization function */
114 113
 	(response_function) 0,      /* response handling function */
115 114
 	(destroy_function) destroy, /* destroy function */
116
-	child_init                  /* per-child init function */
115
+	0                           /* per-child init function */
117 116
 };
118 117
 
119 118
 /**
... ...
@@ -157,10 +156,6 @@ static int mod_init(void)
157 156
 	}
158 157
 	return 0;
159 158
 }
160
-static int child_init(int rank)
161
-{ 
162
-	return 0;
163
-}
164 159
 
165 160
 void destroy(void)
166 161
 {
... ...
@@ -50,7 +50,6 @@ int force_color=0;
50 50
 
51 51
 /** module functions */
52 52
 static int mod_init(void);
53
-static int child_init(int);
54 53
 
55 54
 static int xlog_1(struct sip_msg*, char*, char*);
56 55
 static int xlog_2(struct sip_msg*, char*, char*);
... ...
@@ -115,7 +114,7 @@ struct module_exports exports= {
115 114
 	mod_init,   /* module initialization function */
116 115
 	(response_function) 0,
117 116
 	(destroy_function) destroy,
118
-	child_init  /* per-child init function */
117
+	0           /* per-child init function */
119 118
 };
120 119
 
121 120
 /**
... ...
@@ -132,15 +131,6 @@ static int mod_init(void)
132 131
 	return 0;
133 132
 }
134 133
 
135
-/**
136
- * Initialize children
137
- */
138
-static int child_init(int rank)
139
-{
140
-	LM_DBG("init_child [%d]  pid [%d]\n", rank, getpid());
141
-	return 0;
142
-}
143
-
144 134
 /**
145 135
  */
146 136
 static int xlog_1(struct sip_msg* msg, char* frm, char* str2)