Merge pull request #5026 from taosdata/feature/mac

TD-2837
This commit is contained in:
Shengliang Guan 2021-01-26 21:36:32 +08:00 committed by GitHub
commit fb28ce53df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -114,4 +114,3 @@ bool taosGetSystemUid(char *uid) {
uuid_unparse(uuid, uid);
return true;
}

View File

@ -17,7 +17,7 @@
#define TDENGINE_HTTP_UTIL_H
bool httpCheckUsedbSql(char *sql);
void httpTimeToString(time_t t, char *buf, int32_t buflen);
void httpTimeToString(int32_t t, char *buf, int32_t buflen);
bool httpUrlMatch(HttpContext *pContext, int32_t pos, char *cmp);
bool httpParseRequest(HttpContext *pContext);

View File

@ -29,7 +29,7 @@ bool httpCheckUsedbSql(char *sql) {
return false;
}
void httpTimeToString(time_t t, char *buf, int32_t buflen) {
void httpTimeToString(int32_t t, char *buf, int32_t buflen) {
memset(buf, 0, (size_t)buflen);
char ts[32] = {0};
@ -37,7 +37,7 @@ void httpTimeToString(time_t t, char *buf, int32_t buflen) {
time_t tt = t / 1000;
ptm = localtime(&tt);
strftime(ts, 31, "%Y-%m-%d %H:%M:%S", ptm);
sprintf(buf, "%s.%03" PRId64, ts, (int64_t)(t % 1000));
sprintf(buf, "%s.%03d", ts, t % 1000);
}
int32_t httpAddToSqlCmdBuffer(HttpContext *pContext, const char *const format, ...) {