MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / child_init

Function child_init

modules/rtpengine/rtpengine.c:1905–1936  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1903}
1904
1905static int child_init(int rank)
1906{
1907 int ret;
1908 mypid = getpid();
1909 myrand = rand()%10000;
1910 myrank = rank;
1911
1912 /* external procs are assigned to head of version array */
1913 if (rank == PROC_MODULE)
1914 myrank = 0;
1915
1916 if (db_url.s) {
1917 if (!db_functions.init) {
1918 LM_CRIT("database not bound\n");
1919 return -1;
1920 }
1921
1922 db_connection = db_functions.init(&db_url);
1923 if (!db_connection) {
1924 LM_ERR("Failed to connect to database\n");
1925 return -1;
1926 }
1927
1928 LM_DBG("Database connection opened successfully\n");
1929 }
1930
1931 /* Iterate known RTP proxies - create sockets */
1932 RTPE_START_READ();
1933 ret = connect_rtpengines(1);
1934 RTPE_STOP_READ();
1935 return ret;
1936}
1937
1938static int update_rtpengines(int force_test)
1939{

Callers

nothing calls this directly

Calls 1

connect_rtpenginesFunction · 0.85

Tested by

no test coverage detected