Skip to content

Commit

Permalink
aaa_diameter: Fix some AVP typos; Add a few notices
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Feb 26, 2024
1 parent 4881b95 commit 4da5b73
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion evi/evi_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ int evi_param_set(evi_param_p element, const void *param, int flags);
#define evi_param_set_int(p_el, p_int) \
evi_param_set(p_el, p_int, EVI_INT_VAL)

/* sets a string value to a parameter */
/* sets a string value to a parameter
* WARNING: the string is *not* duplicated, make sure to keep the buffer until
* all "EVI raise" operations have been issued */
#define evi_param_set_str(p_el, p_str) \
evi_param_set(p_el, p_str, EVI_STR_VAL)

Expand Down
10 changes: 5 additions & 5 deletions modules/aaa_diameter/aaa_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,12 +733,12 @@ static int dm_register_digest_avps(void)
FD_CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL);
}

/* Digest-Qop */
/* Digest-QoP */
{
struct dict_avp_data data = {
110, /* Code */
0, /* Vendor */
"Digest-Qop", /* Name */
"Digest-QoP", /* Name */
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
AVP_FLAG_MANDATORY, /* Fixed flag values */
AVP_TYPE_OCTETSTRING /* base type of data */
Expand Down Expand Up @@ -928,7 +928,7 @@ int dm_init_sip_application(void)
that identifies a SIP server.
*/
struct dict_avp_data data = {
369, /* Code */
371, /* Code */
0, /* Vendor */
"SIP-Server-URI", /* Name */
AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */
Expand Down Expand Up @@ -1103,7 +1103,7 @@ int dm_init_sip_application(void)
[ Digest-Algorithm ]
[ Digest-CNonce ]
[ Digest-Opaque ]
[ Digest-Qop ]
[ Digest-QoP ]
[ Digest-Nonce-Count ]
[ Digest-Method]
[ Digest-Entity-Body-Hash ]
Expand All @@ -1128,7 +1128,7 @@ int dm_init_sip_application(void)
{ "Digest-Algorithm", RULE_OPTIONAL, -1, 1 },
{ "Digest-CNonce", RULE_OPTIONAL, -1, 1 },
{ "Digest-Opaque", RULE_OPTIONAL, -1, 1 },
{ "Digest-Qop", RULE_OPTIONAL, -1, 1 },
{ "Digest-QoP", RULE_OPTIONAL, -1, 1 },
{ "Digest-Nonce-Count", RULE_OPTIONAL, -1, 1 },
{ "Digest-Method", RULE_OPTIONAL, -1, 1 },
{ "Digest-Entity-Body-Hash", RULE_OPTIONAL, -1, 1 },
Expand Down
2 changes: 2 additions & 0 deletions modules/aaa_diameter/aaa_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
__FD_CHECK_GT((__call__), (__retok__), out)
#define FD_CHECK_GT(__call__) _FD_CHECK_GT((__call__), 0)

/* Note: if you get a EEXIST (-17) error code while adding an AVP, the error
signifies a data conflict, since duplicate additions are allowed (rc: 0) */
#define FD_CHECK_dict_new(type, data, parent, ref) \
FD_CHECK(fd_dict_new(fd_g_config->cnf_dict, (type), \
(data), (parent), (ref)))
Expand Down

0 comments on commit 4da5b73

Please sign in to comment.