fix invalid packet
This commit is contained in:
parent
1a449a51a1
commit
e1ae5bc7f8
|
@ -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;
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue