Skip to content

Commit f4f0dab

Browse files
committed
fixed windows compile
1 parent 80e43c6 commit f4f0dab

File tree

5 files changed

+26
-26
lines changed

5 files changed

+26
-26
lines changed

mars/comm/network/netinfo_util.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ std::string GetDetailNetInfo() {
6161
break;
6262
}
6363
detail_net_info << "--------NetConfig Info----------"<< "\n";
64-
//2.网络配置信息(默认网关、dns svr、路由表)
64+
//2.网络配置信息(默认网关、dns svr、路由表)
6565
in6_addr addr6_gateway;
6666
memset(&addr6_gateway, 0, sizeof(addr6_gateway));
6767
if (0 == getdefaultgateway6(&addr6_gateway)) {

mars/sdt/src/checkimpl/dnsquery.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ int socket_gethostbyname(const char* _host, socket_ipinfo_t* _ipinfo, int _timeo
209209
dns = (struct DNS_HEADER*)recv_buf; // 指向recv_buf的header
210210
ReadRecvAnswer(recv_buf, dns, reader, answers);
211211

212-
// 把查询到的IP放入返回参数_ipinfo结构体中
212+
// 把查询到的IP放入返回参数_ipinfo结构体中
213213
int answer_count = std::min(SOCKET_MAX_IP_COUNT, (int)ntohs(dns->ans_count));
214214
_ipinfo->size = 0;
215215

@@ -233,7 +233,7 @@ int socket_gethostbyname(const char* _host, socket_ipinfo_t* _ipinfo, int _timeo
233233
FreeAll(answers);
234234
xinfo2(TSF"close fd in dnsquery,sock=%0", sock);
235235
::socket_close(sock);
236-
return ret; //* 查询DNS服务器超时
236+
return ret; //* 查询DNS服务器超时
237237
}
238238

239239
int socket_gethostbyname(const char* _host, socket_ipinfo_t* _ipinfo, int _timeout /*ms*/, const char* _dnsserver) {

mars/stn/stn.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -218,18 +218,18 @@ extern bool (*MakesureAuthed)();
218218
//流量统计
219219
extern void (*TrafficData)(ssize_t _send, ssize_t _recv);
220220

221-
//底层询问上层该host对应的ip列表
221+
//底层询问上层该host对应的ip列表
222222
extern std::vector<std::string> (*OnNewDns)(const std::string& host);
223-
//网络层收到push消息回调
223+
//网络层收到push消息回调
224224
extern void (*OnPush)(uint64_t _channel_id, uint32_t _cmdid, uint32_t _taskid, const AutoBuffer& _body, const AutoBuffer& _extend);
225-
//底层获取task要发送的数据
225+
//底层获取task要发送的数据
226226
extern bool (*Req2Buf)(uint32_t taskid, void* const user_context, AutoBuffer& outbuffer, AutoBuffer& extend, int& error_code, const int channel_select);
227-
//底层回包返回给上层解析
227+
//底层回包返回给上层解析
228228
extern int (*Buf2Resp)(uint32_t taskid, void* const user_context, const AutoBuffer& inbuffer, const AutoBuffer& extend, int& error_code, const int channel_select);
229-
//任务执行结束
229+
//任务执行结束
230230
extern int (*OnTaskEnd)(uint32_t taskid, void* const user_context, int error_type, int error_code);
231231

232-
//上报网络连接状态
232+
//上报网络连接状态
233233
extern void (*ReportConnectStatus)(int status, int longlink_status);
234234

235235
extern void (*OnLongLinkNetworkError)(ErrCmdType _err_type, int _err_code, const std::string& _ip, uint16_t _port);
@@ -243,13 +243,13 @@ extern bool (*OnLonglinkIdentifyResponse)(const AutoBuffer& response_buffer, con
243243
extern void (*RequestSync)();
244244

245245

246-
//底层询问上层http网络检查的域名列表
246+
//底层询问上层http网络检查的域名列表
247247
extern void (*RequestNetCheckShortLinkHosts)(std::vector<std::string>& _hostlist);
248-
//底层向上层上报cgi执行结果
248+
//底层向上层上报cgi执行结果
249249
extern void (*ReportTaskProfile)(const TaskProfile& _task_profile);
250-
//底层通知上层cgi命中限制
250+
//底层通知上层cgi命中限制
251251
extern void (*ReportTaskLimited)(int _check_type, const Task& _task, unsigned int& _param);
252-
//底层上报域名dns结果
252+
//底层上报域名dns结果
253253
extern void (*ReportDnsProfile)(const DnsProfile& _dns_profile);
254254

255255
}}

mars/stn/stn_logic.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,46 +255,46 @@ bool (*MakesureAuthed)()
255255
return sg_callback->MakesureAuthed();
256256
};
257257

258-
// 流量统计
258+
// 流量统计
259259
void (*TrafficData)(ssize_t _send, ssize_t _recv)
260260
= [](ssize_t _send, ssize_t _recv) {
261261
xassert2(sg_callback != NULL);
262262
return sg_callback->TrafficData(_send, _recv);
263263
};
264264

265-
//底层询问上层该host对应的ip列表
265+
//底层询问上层该host对应的ip列表
266266
std::vector<std::string> (*OnNewDns)(const std::string& host)
267267
= [](const std::string& host) {
268268
xassert2(sg_callback != NULL);
269269
return sg_callback->OnNewDns(host);
270270
};
271271

272-
//网络层收到push消息回调
272+
//网络层收到push消息回调
273273
void (*OnPush)(uint64_t _channel_id, uint32_t _cmdid, uint32_t _taskid, const AutoBuffer& _body, const AutoBuffer& _extend)
274274
= [](uint64_t _channel_id, uint32_t _cmdid, uint32_t _taskid, const AutoBuffer& _body, const AutoBuffer& _extend) {
275275
xassert2(sg_callback != NULL);
276276
sg_callback->OnPush(_channel_id, _cmdid, _taskid, _body, _extend);
277277
};
278-
//底层获取task要发送的数据
278+
//底层获取task要发送的数据
279279
bool (*Req2Buf)(uint32_t taskid, void* const user_context, AutoBuffer& outbuffer, AutoBuffer& extend, int& error_code, const int channel_select)
280280
= [](uint32_t taskid, void* const user_context, AutoBuffer& outbuffer, AutoBuffer& extend, int& error_code, const int channel_select) {
281281
xassert2(sg_callback != NULL);
282282
return sg_callback->Req2Buf(taskid, user_context, outbuffer, extend, error_code, channel_select);
283283
};
284-
//底层回包返回给上层解析
284+
//底层回包返回给上层解析
285285
int (*Buf2Resp)(uint32_t taskid, void* const user_context, const AutoBuffer& inbuffer, const AutoBuffer& extend, int& error_code, const int channel_select)
286286
= [](uint32_t taskid, void* const user_context, const AutoBuffer& inbuffer, const AutoBuffer& extend, int& error_code, const int channel_select) {
287287
xassert2(sg_callback != NULL);
288288
return sg_callback->Buf2Resp(taskid, user_context, inbuffer, extend, error_code, channel_select);
289289
};
290-
//任务执行结束
290+
//任务执行结束
291291
int (*OnTaskEnd)(uint32_t taskid, void* const user_context, int error_type, int error_code)
292292
= [](uint32_t taskid, void* const user_context, int error_type, int error_code) {
293293
xassert2(sg_callback != NULL);
294294
return sg_callback->OnTaskEnd(taskid, user_context, error_type, error_code);
295295
};
296296

297-
//上报网络连接状态
297+
//上报网络连接状态
298298
void (*ReportConnectStatus)(int status, int longlink_status)
299299
= [](int status, int longlink_status) {
300300
xassert2(sg_callback != NULL);

mars/stn/stn_logic.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,22 @@ namespace stn{
4646
//流量统计
4747
virtual void TrafficData(ssize_t _send, ssize_t _recv) = 0;
4848

49-
//底层询问上层该host对应的ip列表
49+
//底层询问上层该host对应的ip列表
5050
virtual std::vector<std::string> OnNewDns(const std::string& host) = 0;
51-
//网络层收到push消息回调
51+
//网络层收到push消息回调
5252
virtual void OnPush(uint64_t _channel_id, uint32_t _cmdid, uint32_t _taskid, const AutoBuffer& _body, const AutoBuffer& _extend) = 0;
53-
//底层获取task要发送的数据
53+
//底层获取task要发送的数据
5454
virtual bool Req2Buf(uint32_t _taskid, void* const _user_context, AutoBuffer& outbuffer, AutoBuffer& extend, int& error_code, const int channel_select) = 0;
55-
//底层回包返回给上层解析
55+
//底层回包返回给上层解析
5656
virtual int Buf2Resp(uint32_t _taskid, void* const _user_context, const AutoBuffer& _inbuffer, const AutoBuffer& _extend, int& _error_code, const int _channel_select) = 0;
5757
//任务执行结束
5858
virtual int OnTaskEnd(uint32_t _taskid, void* const _user_context, int _error_type, int _error_code) = 0;
5959

60-
//上报网络连接状态
60+
//上报网络连接状态
6161
virtual void ReportConnectStatus(int _status, int _longlink_status) = 0;
6262
//长连信令校验 ECHECK_NOW = 0, ECHECK_NEXT = 1, ECHECK_NEVER = 2
6363
virtual int GetLonglinkIdentifyCheckBuffer(AutoBuffer& _identify_buffer, AutoBuffer& _buffer_hash, int32_t& _cmdid) = 0;
64-
//长连信令校验回包
64+
//长连信令校验回包
6565
virtual bool OnLonglinkIdentifyResponse(const AutoBuffer& _response_buffer, const AutoBuffer& _identify_buffer_hash) = 0;
6666

6767

0 commit comments

Comments
 (0)