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

Function dm_enc_get

modules/aaa_diameter/dm_impl.c:2367–2382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2365}
2366
2367static struct dict_avp_enc_f *dm_enc_get(int code, int vendor)
2368{
2369 struct dict_avp_enc_a *a;
2370 struct dict_avp_enc_v *v;
2371
2372 /* hardcode some values which are misrepresented */
2373 if (code == 55 && vendor == 0) /* Event-Timestamp is declared as OCTETSTRING, not TIME */
2374 return &dict_avp_enc[AVP_ENC_TYPE_TIME];
2375
2376 v = bsearch(&vendor, dict_avp_enc_vendors, dict_avp_enc_vendors_no, sizeof
2377 *v, dict_avp_enc_v_cmp);
2378 if (!v || !v->avps_no || !v->avps)
2379 return NULL;
2380 a = bsearch(&code, v->avps, v->avps_no, sizeof *a, dict_avp_enc_a_cmp);
2381 return a?enc_type2func(a->enc):NULL;
2382}
2383
2384static int dict_avp_enc_ip(cJSON *obj, struct dict_avp_data *avp, int _, str *ret)
2385{

Callers 2

dm_avps2jsonFunction · 0.85
dm_build_avpsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected