From 047eb14f673aeb0e1ec10a56dee9c00fd9660e19 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 8 Nov 2023 11:57:49 +0800 Subject: [PATCH] fix:error --- source/common/src/cos.c | 10 +++++----- source/libs/stream/src/streamCheckpoint.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/common/src/cos.c b/source/common/src/cos.c index 423b7c1243..3a775816f7 100644 --- a/source/common/src/cos.c +++ b/source/common/src/cos.c @@ -298,7 +298,7 @@ S3Status initial_multipart_callback(const char *upload_id, void *callbackData) { } S3Status MultipartResponseProperiesCallback(const S3ResponseProperties *properties, void *callbackData) { - responsePropertiesCallback(properties, callbackData); +// responsePropertiesCallback(properties, callbackData); MultipartPartData *data = (MultipartPartData *)callbackData; int seq = data->seq; @@ -476,7 +476,7 @@ int32_t s3PutObjectFromFile2(const char *file, const char *object) { metaProperties, useServerSideEncryption}; if (contentLength <= MULTIPART_CHUNK_SIZE) { - S3PutObjectHandler putObjectHandler = {{&responsePropertiesCallback, &responseCompleteCallback}, + S3PutObjectHandler putObjectHandler = {{NULL, &responseCompleteCallback}, &putObjectDataCallback}; do { @@ -513,14 +513,14 @@ int32_t s3PutObjectFromFile2(const char *file, const char *object) { memset(&partData, 0, sizeof(MultipartPartData)); int partContentLength = 0; - S3MultipartInitialHandler handler = {{&responsePropertiesCallback, &responseCompleteCallback}, + S3MultipartInitialHandler handler = {{NULL, &responseCompleteCallback}, &initial_multipart_callback}; S3PutObjectHandler putObjectHandler = {{&MultipartResponseProperiesCallback, &responseCompleteCallback}, &putObjectDataCallback}; S3MultipartCommitHandler commit_handler = { - {&responsePropertiesCallback, &responseCompleteCallback}, &multipartPutXmlCallback, 0}; + {NULL, &responseCompleteCallback}, &multipartPutXmlCallback, 0}; manager.etags = (char **)taosMemoryMalloc(sizeof(char *) * totalSeq); manager.next_etags_pos = 0; @@ -668,7 +668,7 @@ static void s3FreeObjectKey(void *pItem) { static SArray* getListByPrefix(const char *prefix){ S3BucketContext bucketContext = {0, tsS3BucketName, protocolG, uriStyleG, tsS3AccessKeyId, tsS3AccessKeySecret, 0, awsRegionG}; - S3ListBucketHandler listBucketHandler = {{&responsePropertiesCallback, &responseCompleteCallback}, + S3ListBucketHandler listBucketHandler = {{NULL, &responseCompleteCallback}, &listBucketCallback}; const char *marker = 0, *delimiter = 0; diff --git a/source/libs/stream/src/streamCheckpoint.c b/source/libs/stream/src/streamCheckpoint.c index b4a9dd3b43..3cfdd65a77 100644 --- a/source/libs/stream/src/streamCheckpoint.c +++ b/source/libs/stream/src/streamCheckpoint.c @@ -478,7 +478,7 @@ static int uploadCheckpointToS3(char* id, char* path){ taosDirEntryIsDir(de)) continue; char filename[PATH_MAX] = {0}; - if(path[strlen(path - 1)] == TD_DIRSEP_CHAR){ + if(path[strlen(path) - 1] == TD_DIRSEP_CHAR){ snprintf(filename, sizeof(filename), "%s%s", path, name); }else{ snprintf(filename, sizeof(filename), "%s%s%s", path, TD_DIRSEP, name);