Module: kamailio
Branch: master
Commit: 556682f8e2cf7e064b7df1ff31fdc496dc51b7ac
URL:
https://github.com/kamailio/kamailio/commit/556682f8e2cf7e064b7df1ff31fdc49…
Author: Stefan Mititelu <stefan.mititelu(a)net2phone.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-09-18T10:01:10+02:00
kafka: Fix per topic stats bug
Bug added by me in commit 0b5e6ac310b7acdf96da0ec6bcbdca021a5089a2.
---
Modified: src/modules/kafka/kfk.c
---
Diff:
https://github.com/kamailio/kamailio/commit/556682f8e2cf7e064b7df1ff31fdc49…
Patch:
https://github.com/kamailio/kamailio/commit/556682f8e2cf7e064b7df1ff31fdc49…
---
diff --git a/src/modules/kafka/kfk.c b/src/modules/kafka/kfk.c
index d9e8a8b9f6d..f8e9379da80 100644
--- a/src/modules/kafka/kfk.c
+++ b/src/modules/kafka/kfk.c
@@ -1045,6 +1045,8 @@ static kfk_stats_t *kfk_stats_topic_new(str *topic,
rd_kafka_resp_err_t err)
goto error;
}
memcpy(st->topic_name->s, topic->s, topic->len);
+ st->topic_name->s[topic->len] = '\0';
+ st->topic_name->len = topic->len;
st->total++;
if(err) {