This commit is contained in:
slguan 2021-01-25 18:43:34 +08:00
parent becc98420c
commit 054a700a29
4 changed files with 10 additions and 12 deletions

View File

@ -138,14 +138,6 @@ void mnodeDecClusterRef(SClusterObj *pCluster) {
sdbDecRef(tsClusterSdb, pCluster);
}
#ifdef __APPLE__
bool taosGetSystemUid(char *uid) {
fprintf(stderr, "%s[%d]%s(): not implemented yet!\n", basename(__FILE__), __LINE__, __func__);
abort();
return false;
}
#endif // __APPLE__
static int32_t mnodeCreateCluster() {
int64_t numOfClusters = sdbGetNumOfRows(tsClusterSdb);
if (numOfClusters != 0) return TSDB_CODE_SUCCESS;

View File

@ -104,3 +104,9 @@ int taosSystem(const char *cmd) {
void taosSetCoreDump() {}
char *taosGetCmdlineByPID(int pid) { return ""; }
bool taosGetSystemUid(char *uid) {
fprintf(stderr, "%s[%d]%s(): not implemented yet!\n", basename(__FILE__), __LINE__, __func__);
abort();
return false;
}

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, t % 1000);
sprintf(buf, "%s.%03d", ts, t % 1000);
}
int32_t httpAddToSqlCmdBuffer(HttpContext *pContext, const char *const format, ...) {