MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / response

Method response

tools/comdb2ar/appsock.cpp:328–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326}
327
328bool Appsock::response(const std::string& rsp)
329{
330 SigPipeBlocker block_sigpipe;
331
332 // Get the response - we expect "log file deletion disable"
333 sbuf2settimeout(impl->m_sb, 10 * 1000, 10 * 1000);
334 char line[256];
335 if(sbuf2gets(line, sizeof(line), impl->m_sb) <= 0) {
336 std::clog << "no response from " << impl->m_dbname << " expected "
337 << rsp << std::endl;
338 return false;
339 } else if(std::strcmp(line, rsp.c_str()) != 0) {
340 std::clog << "bad response from " << impl->m_dbname << " expected "
341 << rsp << std::endl;
342 return false;
343 }
344
345 return true;
346}
347
348std::string Appsock::read_response()
349{

Callers 2

LogHolderMethod · 0.80
RepopNewLrlMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected