From ae4ec6c1fe137ba061850410d4e6d69ed550acd5 Mon Sep 17 00:00:00 2001 From: yuruiyin <617921014@qq.com> Date: Thu, 28 Mar 2024 15:53:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dpersistent=E5=88=86?= =?UTF-8?q?=E6=94=AF=E6=9E=84=E5=BB=BA=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=201.=20sls=5Flog=5Finit=E6=96=B9=E6=B3=95=E5=A4=9A?= =?UTF-8?q?=E4=BA=86=E4=B8=80=E4=B8=AA=E6=97=A0=E7=94=A8=E7=9A=84=E5=8F=82?= =?UTF-8?q?=E6=95=B0=202.=20=E4=BF=AE=E5=A4=8Dsprintf=E6=BA=90=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=E4=B8=8E=E7=9B=AE=E6=A0=87=E5=AF=B9=E8=B1=A1=E9=87=8D?= =?UTF-8?q?=E5=8F=A0=E7=9A=84=E9=97=AE=E9=A2=98=203.=20gitignore=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0cmake-build-debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- src/log_api.c | 2 +- src/log_producer_manager.c | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e3182ef..cf0bc7a 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,4 @@ sample/log_c_sdk_sample.cbp # IDEA .idea - +cmake-build-debug diff --git a/src/log_api.c b/src/log_api.c index dc6298d..ed09cc9 100644 --- a/src/log_api.c +++ b/src/log_api.c @@ -15,7 +15,7 @@ unsigned int LOG_GET_TIME(); void log_http_inject_headers(log_producer_config *config, char **src_headers, int src_count, char **dest_headers, int *dest_count); void log_http_release_inject_headers(log_producer_config *config, char **dest_headers, int dest_count); -log_status_t sls_log_init(int32_t log_global_flag) +log_status_t sls_log_init() { #if 0 CURLcode ecode; diff --git a/src/log_producer_manager.c b/src/log_producer_manager.c index d70caf3..c785d62 100644 --- a/src/log_producer_manager.c +++ b/src/log_producer_manager.c @@ -49,8 +49,7 @@ char * _get_pack_id(const char * configName, const char * ip) _generate_pack_id_timestamp(×tamp); char *prefix = (char *) malloc(100 * sizeof (char)); - strcpy(prefix, configName); - sprintf(prefix, "%s%ld", prefix, timestamp); + sprintf(prefix, "%s%ld", configName, timestamp); unsigned char md5Buf[16]; mbedtls_md5((const unsigned char *)prefix, strlen(prefix), md5Buf);