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

Function dm_init_prot

modules/aaa_diameter/dm_impl.c:1619–1658  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1617
1618
1619aaa_conn *dm_init_prot(str *aaa_url)
1620{
1621 static str previous_url;
1622 aaa_prot_config parsed;
1623
1624 if (previous_url.s && !str_match(&previous_url, aaa_url)) {
1625 LM_ERR("please use the same Diameter URL for all modules\n");
1626 return NULL;
1627 }
1628
1629 if (!previous_url.s && pkg_str_dup(&previous_url, aaa_url) != 0) {
1630 LM_ERR("oom\n");
1631 return NULL;
1632 }
1633
1634 if (aaa_parse_url(aaa_url, &parsed) != 0) {
1635 LM_ERR("bad AAA URL\n");
1636 return NULL;
1637 }
1638
1639 if (strlen((char *)parsed.rest)) {
1640 if (parse_config_string((char *)parsed.rest,
1641 &dm_conf_filename, &extra_avps_file) != 0) {
1642 LM_ERR("failed to parse config string\n");
1643 return NULL;
1644 }
1645 }
1646
1647 if (dm_init_minimal() != 0) {
1648 LM_ERR("failed to init freeDiameter global dictionary\n");
1649 return NULL;
1650 }
1651
1652 if (parse_extra_avps(extra_avps_file) != 0) {
1653 LM_ERR("failed to load the 'extra-avps-file'\n");
1654 return NULL;
1655 }
1656
1657 return DM_DUMMY_HANDLE;
1658}
1659
1660
1661int freeDiameter_init(void)

Callers 1

mod_initFunction · 0.85

Calls 6

str_matchFunction · 0.85
pkg_str_dupFunction · 0.85
aaa_parse_urlFunction · 0.85
parse_config_stringFunction · 0.85
dm_init_minimalFunction · 0.85
parse_extra_avpsFunction · 0.85

Tested by

no test coverage detected