Module: kamailio Branch: 5.3 Commit: 82f82fc80d795f718e35db79b66b320ed690f2e6 URL: https://github.com/kamailio/kamailio/commit/82f82fc80d795f718e35db79b66b320e...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2020-09-10T10:31:30+02:00
xcap_server: rever use of STR_VTOZ macro
- got it by picking a commit with another fix and this macro is not in branch 5.3
---
Modified: src/modules/xcap_server/xcap_server.c
---
Diff: https://github.com/kamailio/kamailio/commit/82f82fc80d795f718e35db79b66b320e... Patch: https://github.com/kamailio/kamailio/commit/82f82fc80d795f718e35db79b66b320e...
---
diff --git a/src/modules/xcap_server/xcap_server.c b/src/modules/xcap_server/xcap_server.c index 1556aa14b9..20b229d268 100644 --- a/src/modules/xcap_server/xcap_server.c +++ b/src/modules/xcap_server/xcap_server.c @@ -321,12 +321,13 @@ int xcaps_xpath_hack(str *buf, int type) }
start = buf->s; - STR_VTOZ(buf->s[buf->len-1], c); + c = buf->s[buf->len-1]; + buf->s[buf->len-1] = '\0'; while((start < buf->s + buf->len - 8) && (p = strstr(start, match))!=NULL) { memcpy(p, repl, 7); start = p + 7; } - STR_ZTOV(buf->s[buf->len-1], c); + buf->s[buf->len-1] = c; return 0; }