Browse code

htable: docs - not about use of event_route[htable:mod-init]

Daniel-Constantin Mierla authored on 11/02/2021 16:32:45
Showing 1 changed files
... ...
@@ -1528,6 +1528,18 @@ kamcmd htable.stats
1528 1528
 			once, after core and module initialization, but before &kamailio; forks any
1529 1529
 			child processes.
1530 1530
 		</para>
1531
+		<para>
1532
+			Note: do not expect to use functions from all other modules here,
1533
+			even if they are loaded before the htable module, because many of
1534
+			them initialize their runtime structures inside child init callbacks,
1535
+			which are executed after this moment, when forking child processes.
1536
+			For example, sqlops cannot be used, connections to database are
1537
+			initialized in child init. Even more, it is recommended not to use
1538
+			functions from other modules, because it can mess up what they
1539
+			created in mod init callback and expect in child init callback. It
1540
+			should be ok to use functions from htable module or assignment
1541
+			operations.
1542
+		</para>
1531 1543
 <programlisting  format="linespecific">
1532 1544
 ...
1533 1545
 event_route[htable:mod-init] {