diff options
author | Aaron An <anjb@ti-net.com.cn> | 2016-01-04 18:26:55 +0800 |
---|---|---|
committer | AaronAn <anjb@ti-net.com.cn> | 2016-01-06 09:48:35 +0800 |
commit | 084563e1362b8c63f5638084b8ae9093a87d35f8 (patch) | |
tree | a221a8879ef647a13b3b6517307a4ce31d030beb /cel | |
parent | 11d99e0809058841b3f0db4771b212c683ff92a9 (diff) |
cel/cel_radius: Fix wrong pointer.
The macro ADD_VENDOR_CODE defined in the cel_radius.c should use the parameter
y not the address of y.
I capture the radius UDP packet via tcpdump, and the AV pairs are not correct,
then i review the source code and compare it with cdr/cdr_radius.c. Fix it and
it works.
ASTERISK-25647 #close
Reported by: Aaron An
Tested by: Aaron An
Change-Id: I72889bccd8fde120d47aa659edc0e7e6d4d019f0
Diffstat (limited to 'cel')
-rw-r--r-- | cel/cel_radius.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cel/cel_radius.c b/cel/cel_radius.c index 617ca660d..3c20e9780 100644 --- a/cel/cel_radius.c +++ b/cel/cel_radius.c @@ -95,7 +95,7 @@ static rc_handle *rh = NULL; #define RADIUS_BACKEND_NAME "CEL Radius Logging" -#define ADD_VENDOR_CODE(x,y) (rc_avpair_add(rh, send, x, &y, strlen(y), VENDOR_CODE)) +#define ADD_VENDOR_CODE(x,y) (rc_avpair_add(rh, send, x, (void *)y, strlen(y), VENDOR_CODE)) static int build_radius_record(VALUE_PAIR **send, struct ast_cel_event_record *record) { @@ -176,7 +176,7 @@ static int build_radius_record(VALUE_PAIR **send, struct ast_cel_event_record *r /* Setting Acct-Session-Id & User-Name attributes for proper generation of Acct-Unique-Session-Id on server side */ /* Channel */ - if (!rc_avpair_add(rh, send, PW_USER_NAME, &record->channel_name, + if (!rc_avpair_add(rh, send, PW_USER_NAME, (void *)record->channel_name, strlen(record->channel_name), 0)) { return -1; } |