Implements Impala::Util::ChannelListener. Definition at line 60 of file ChannelServer.h. References AcceptRequest(), ConnectionDescr(), Impala::Util::Channel::DATA_BUFFER_SIZE, Impala::Util::Channel::GetCurRequestConnection(), Impala::Util::Channel::GetCurRequestPort(), ILOG_DEBUG, ILOG_WARN, mChannel, and Impala::Min(). 00061 { 00062 buf[len] = '\0'; 00063 String bufStr(buf, len - 1); // exclude '\0' 00064 String bufStrPart = (len > 20) ? bufStr.substr(0, 20) : bufStr; 00065 ILOG_DEBUG("Request from " << ConnectionDescr() 00066 << " (" << len << " bytes) : [" << bufStrPart << "]"); 00067 00068 CString reqConn = mChannel->GetCurRequestConnection(); 00069 int reqPort = mChannel->GetCurRequestPort(); 00070 int responseLen = AcceptRequest(buf, len, bufSize, reqConn, reqPort); 00071 if (responseLen < 0) 00072 { 00073 String bufStr(buf, len - 1); // exclude '\0' 00074 String bufStrPart = (len > 20) ? bufStr.substr(0, 20) : bufStr; 00075 ILOG_WARN("Unknown request from " << ConnectionDescr() << " : [" << 00076 bufStrPart << "]"); 00077 sprintf(buf, "ERROR : Unknown request\0"); 00078 responseLen = strlen(buf) + 1; 00079 } 00080 00081 // SK: guard against buffer overflow 00082 return Min(responseLen, Channel::DATA_BUFFER_SIZE); 00083 }
Here is the call graph for this function:
|