MCPcopy Create free account
hub / github.com/Tencent/phxsql / GetIPList

Function GetIPList

phxbinlogsvr/framework/phxrpc/tools/phxbinlog_tool_impl.cpp:294–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294vector<string> GetIPList(const char *ip_list_str) {
295 vector < string > ip_list;
296 string ip = "";
297 int len = strlen(ip_list_str);
298 for (int i = 0; i < len; ++i) {
299 if (ip_list_str[i] == ',') {
300 ip_list.push_back(ip);
301 ip = "";
302 continue;
303 }
304 ip += ip_list_str[i];
305 }
306 if (ip.size() > 0) {
307 ip_list.push_back(ip);
308 }
309 return ip_list;
310}
311
312bool PhxbinlogToolImpl::CheckIPList(const vector<string> &ip_list, const uint32_t &port) {
313 if (ip_list.size() == 0) {

Callers 4

InitBinlogSvrMasterMethod · 0.85
RealGetMasterInfoMethod · 0.85
RealGetLastSendGTIDMethod · 0.85
RealGetMemberListMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected