提交 e1ae5bc7 编写于 作者: dengyihao's avatar dengyihao

fix invalid packet

上级 1a449a51
...@@ -75,7 +75,7 @@ int32_t tsMonitorMaxLogs = 100; ...@@ -75,7 +75,7 @@ int32_t tsMonitorMaxLogs = 100;
bool tsMonitorComp = false; bool tsMonitorComp = false;
// telem // telem
bool tsEnableTelem = false; bool tsEnableTelem = true;
int32_t tsTelemInterval = 86400; int32_t tsTelemInterval = 86400;
char tsTelemServer[TSDB_FQDN_LEN] = "telemetry.taosdata.com"; char tsTelemServer[TSDB_FQDN_LEN] = "telemetry.taosdata.com";
uint16_t tsTelemPort = 80; uint16_t tsTelemPort = 80;
...@@ -166,7 +166,7 @@ int32_t tsTtlPushInterval = 86400; ...@@ -166,7 +166,7 @@ int32_t tsTtlPushInterval = 86400;
int32_t tsGrantHBInterval = 60; int32_t tsGrantHBInterval = 60;
#ifndef _STORAGE #ifndef _STORAGE
int32_t taosSetTfsCfg(SConfig *pCfg) { int32_t taosSetTfsCfg(SConfig *pCfg) {
SConfigItem *pItem = cfgGetItem(pCfg, "dataDir"); SConfigItem *pItem = cfgGetItem(pCfg, "dataDir");
memset(tsDataDir, 0, PATH_MAX); memset(tsDataDir, 0, PATH_MAX);
...@@ -180,7 +180,7 @@ int32_t taosSetTfsCfg(SConfig *pCfg) { ...@@ -180,7 +180,7 @@ int32_t taosSetTfsCfg(SConfig *pCfg) {
uError("failed to create dataDir:%s", tsDataDir); uError("failed to create dataDir:%s", tsDataDir);
return -1; return -1;
} }
return 0; return 0;
} }
#else #else
int32_t taosSetTfsCfg(SConfig *pCfg); int32_t taosSetTfsCfg(SConfig *pCfg);
......
...@@ -152,15 +152,15 @@ static void clientConnCb(uv_connect_t* req, int32_t status) { ...@@ -152,15 +152,15 @@ static void clientConnCb(uv_connect_t* req, int32_t status) {
} }
static int32_t taosBuildDstAddr(const char* server, uint16_t port, struct sockaddr_in* dest) { static int32_t taosBuildDstAddr(const char* server, uint16_t port, struct sockaddr_in* dest) {
uint32_t ipv4 = taosGetIpv4FromFqdn(server); uint32_t ip = taosGetIpv4FromFqdn(server);
if (ipv4 == 0xffffffff) { if (ip == 0xffffffff) {
terrno = TAOS_SYSTEM_ERROR(errno); terrno = TAOS_SYSTEM_ERROR(errno);
uError("http-report failed to get http server:%s ip since %s", server, terrstr()); uError("http-report failed to get http server:%s ip since %s", server, terrstr());
return -1; return -1;
} }
char ipv4Buf[128] = {0}; char buf[128] = {0};
tinet_ntoa(ipv4Buf, ipv4); tinet_ntoa(buf, ip);
uv_ip4_addr(ipv4Buf, port, dest); uv_ip4_addr(buf, port, dest);
return 0; return 0;
} }
int32_t taosSendHttpReport(const char* server, uint16_t port, char* pCont, int32_t contLen, EHttpCompFlag flag) { int32_t taosSendHttpReport(const char* server, uint16_t port, char* pCont, int32_t contLen, EHttpCompFlag flag) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册