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

Function init_rpid_avp

modules/auth/rpid.c:55–79  ·  view source on GitHub ↗

* Parse and set the RPID AVP specs */

Source from the content-addressed store, hash-verified

53 * Parse and set the RPID AVP specs
54 */
55int init_rpid_avp(char *rpid_avp_param)
56{
57 pv_spec_t avp_spec;
58 str stmp;
59 if (rpid_avp_param && *rpid_avp_param) {
60 stmp.s = rpid_avp_param; stmp.len = strlen(stmp.s);
61 if (pv_parse_spec(&stmp, &avp_spec)==0
62 || avp_spec.type!=PVT_AVP) {
63 LM_ERR("malformed or non AVP %s AVP definition\n", rpid_avp_param);
64 return -1;
65 }
66
67 if(pv_get_avp_name(0, &(avp_spec.pvp), &rpid_avp_name,
68 &rpid_avp_type)!=0)
69 {
70 LM_ERR("[%s]- invalid AVP definition\n", rpid_avp_param);
71 return -1;
72 }
73 } else {
74 rpid_avp_name = -1;
75 rpid_avp_type = 0;
76 }
77
78 return 0;
79}
80
81
82/*

Callers 1

mod_initFunction · 0.85

Calls 2

pv_parse_specFunction · 0.85
pv_get_avp_nameFunction · 0.85

Tested by

no test coverage detected