diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index f8153abd67304b3d553ec18920df99afa8cfbf87..f3bb479144c73addeb403d3bb95148ea4f500e9e 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -1980,6 +1980,7 @@ static int32_t parseSmlTimeStamp(TAOS_SML_KV **pTS, const char **idx, int32_t le if (len > 0) { value = calloc(len + 1, 1); memcpy(value, start, len); + len = strtrim(value); } ret = convertSmlTimeStamp(*pTS, value, len, info); @@ -2677,7 +2678,7 @@ int32_t tscParseLines(char* data, int32_t len, char* lines[], int numLines, SArr int32_t lenTmp = 0; for(int i = 0; i < len; i++){ if(data[i] == '\n' || i == len - 1){ - if(data[i] != '\n' || i == len - 1){ + if(data[i] != '\n' && i == len - 1){ lenTmp ++; } if(lenTmp > 0) { diff --git a/src/client/src/tscParseOpenTSDB.c b/src/client/src/tscParseOpenTSDB.c index cdc9d1585ae8abae054e3fa15ea4037e5dadd0dc..f0c7b6e0c5704decb67995e2181a929709bab414 100644 --- a/src/client/src/tscParseOpenTSDB.c +++ b/src/client/src/tscParseOpenTSDB.c @@ -428,7 +428,7 @@ static int32_t tscParseTelnetLines(char* data, int32_t len, char* lines[], int n int32_t lenTmp = 0; for(int i = 0; i < len; i++){ if(data[i] == '\n' || i == len - 1){ - if(data[i] != '\n' || i == len - 1){ + if(data[i] != '\n' && i == len - 1){ lenTmp++; } if(lenTmp > 0) {