Module: kamailio Branch: master Commit: f1da698dd57b2cbe549f4b9083f66ebc336433c3 URL: https://github.com/kamailio/kamailio/commit/f1da698dd57b2cbe549f4b9083f66ebc...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2023-06-13T09:45:13+02:00
cdp: shortened log message for unkown type inside AAAConvertAVPToString()
---
Modified: src/modules/cdp/diameter_avp.c
---
Diff: https://github.com/kamailio/kamailio/commit/f1da698dd57b2cbe549f4b9083f66ebc... Patch: https://github.com/kamailio/kamailio/commit/f1da698dd57b2cbe549f4b9083f66ebc...
---
diff --git a/src/modules/cdp/diameter_avp.c b/src/modules/cdp/diameter_avp.c index 7d3530427e..d90829dbe6 100644 --- a/src/modules/cdp/diameter_avp.c +++ b/src/modules/cdp/diameter_avp.c @@ -500,11 +500,14 @@ char *AAAConvertAVPToString(AAA_AVP *avp, char *dest, unsigned int destLen) break; //case AAA_AVP_INTEGER64_TYPE: case AAA_AVP_TIME_TYPE: - default: - LM_WARN("AAAConvertAVPToString: don't know how to print" - " this data type [%d] -> tryng hexa\n", - avp->type); case AAA_AVP_DATA_TYPE: + /* print hexa values */ + for(i = 0; i < avp->data.len && l < destLen - 1; i++) + l += snprintf(dest + l, destLen - l - 1, "%x", + ((unsigned char *)avp->data.s)[i]); + break; + default: + LM_WARN("unknown avp data type [%d] -> printing hexa\n", avp->type); for(i = 0; i < avp->data.len && l < destLen - 1; i++) l += snprintf(dest + l, destLen - l - 1, "%x", ((unsigned char *)avp->data.s)[i]);