From 093c02e3f0b80374763ef09c460bd7a77ac7b269 Mon Sep 17 00:00:00 2001 From: liuxueli Date: Thu, 2 Sep 2021 15:15:15 +0800 Subject: [PATCH] =?UTF-8?q?TSG-7607:=20=E9=80=82=E9=85=8DTOPIC=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/tsg_log_field.conf | 17 ++++++++--------- src/tsg_send_log.cpp | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/bin/tsg_log_field.conf b/bin/tsg_log_field.conf index 9019032..aee519b 100644 --- a/bin/tsg_log_field.conf +++ b/bin/tsg_log_field.conf @@ -1,14 +1,13 @@ #TYPE:1:UCHAR,2:USHORT,3:ULONG,4:ULOG,5:USTRING,6:FILE,7:UBASE64,8:PACKET #TYPE TOPIC SERVICE -TOPIC SECURITY-EVENT-LOG 0 -TOPIC SECURITY-EVENT-LOG 1 -TOPIC CONNECTION-RECORD-LOG 2 -TOPIC CONNECTION-SKETCH 3 -TOPIC INTERNAL-RTP-LOG 4 -TOPIC VOIP-RECORD-LOG 5 -TOPIC LIVE-SESSION-RECORD-LOG 6 -TOPIC TRANSACTION-RECORD-LOG 7 -TOPIC GTPC-RECORD-LOG 8 +TOPIC SECURITY-EVENT 0 +TOPIC SECURITY-EVENT 1 +TOPIC SESSION-RECORD 2 +TOPIC INTERNAL-RTP-RECORD 4 +TOPIC VOIP-RECORD 5 +TOPIC INTERIM-SESSION-RECORD 6 +TOPIC TRANSACTION-RECORD 7 +TOPIC GTPC-RECORD 8 #TYPE FIELD VALUE LONG common_policy_id 1 diff --git a/src/tsg_send_log.cpp b/src/tsg_send_log.cpp index a83093c..dd11c1b 100644 --- a/src/tsg_send_log.cpp +++ b/src/tsg_send_log.cpp @@ -1464,7 +1464,7 @@ struct tsg_log_instance_t *tsg_sendlog_init(const char *conffile) rd_kafka_conf_set(rdkafka_conf, "socket.keepalive.enable", "true", kafka_errstr, sizeof(kafka_errstr)); rd_kafka_conf_set(rdkafka_conf, "bootstrap.servers", _instance->broker_list, kafka_errstr, sizeof(kafka_errstr)); - if(strlen(_instance->sasl_passwd)> 0 && strlen(_instance->sasl_passwd)>0) + if(strlen(_instance->sasl_username)> 0 && strlen(_instance->sasl_passwd)>0) { rd_kafka_conf_set(rdkafka_conf, "security.protocol", "sasl_plaintext", kafka_errstr, sizeof(kafka_errstr)); rd_kafka_conf_set(rdkafka_conf, "sasl.mechanisms", "PLAIN", kafka_errstr, sizeof(kafka_errstr));