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

Function check_rls

route.c:1849–1929  ·  view source on GitHub ↗

! \brief check all parsed routing tables for compatiblity between * route types and called module functions; * \return 0 if ok , <0 on error */

Source from the content-addressed store, hash-verified

1847 * \return 0 if ok , <0 on error
1848 */
1849int check_rls(void)
1850{
1851 int i,ret;
1852
1853 rcheck_status = 0;
1854
1855 if(sroutes->request[0].a){
1856 if ((ret=check_actions(sroutes->request[0].a,
1857 REQUEST_ROUTE))!=0){
1858 LM_ERR("check failed for main request route\n");
1859 return ret;
1860 }
1861 }
1862 for(i=0;i<ONREPLY_RT_NO;i++){
1863 if(sroutes->onreply[i].a){
1864 if ((ret=check_actions(sroutes->onreply[i].a,
1865 ONREPLY_ROUTE))!=0){
1866 LM_ERR("check failed for onreply_route[%d]\n",i);
1867 return ret;
1868 }
1869 }
1870 }
1871 for(i=0;i<FAILURE_RT_NO;i++){
1872 if(sroutes->failure[i].a){
1873 if ((ret=check_actions(sroutes->failure[i].a,
1874 FAILURE_ROUTE))!=0){
1875 LM_ERR("check failed for failure_route[%d]\n",i);
1876 return ret;
1877 }
1878 }
1879 }
1880 for(i=0;i<BRANCH_RT_NO;i++){
1881 if(sroutes->branch[i].a){
1882 if ((ret=check_actions(sroutes->branch[i].a,
1883 BRANCH_ROUTE))!=0){
1884 LM_ERR("check failed for branch_route[%d]\n",i);
1885 return ret;
1886 }
1887 }
1888 }
1889 if(sroutes->error.a){
1890 if ((ret=check_actions(sroutes->error.a,ERROR_ROUTE))!=0){
1891 LM_ERR("check failed for error_route\n");
1892 return ret;
1893 }
1894 }
1895 if(sroutes->local.a){
1896 if ((ret=check_actions(sroutes->local.a,LOCAL_ROUTE))!=0){
1897 LM_ERR("check failed for local_route\n");
1898 return ret;
1899 }
1900 }
1901 if(sroutes->startup.a){
1902 if ((ret=check_actions(sroutes->startup.a,STARTUP_ROUTE))!=0){
1903 LM_ERR("check failed for startup_route\n");
1904 return ret;
1905 }
1906 }

Callers 1

mainFunction · 0.85

Calls 1

check_actionsFunction · 0.85

Tested by

no test coverage detected