Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

virtual int Impala::Util::ChannelServer::AcceptRequest ( char *  buf,
int  len,
int  bufSize,
CString  conn,
int  port 
) [inline, protected, virtual]

Reimplemented in Impala::Application::DataServer, Impala::Application::FileServer, Impala::Core::IDash::Server, and Impala::Job::Server.

Definition at line 147 of file ChannelServer.h.

References AcceptRequestPortAssignment(), AcceptRequestPortMode(), ConnectionDescr(), ILOG_DEBUG, ILOG_WARN, mDoDynaPorts, mFirstPort, and mPortAssignment.

Referenced by Impala::Application::FileServer::AcceptRequest(), Impala::Application::DataServer::AcceptRequest(), and HandleRequest().

00148     {
00149         String curCon = ConnectionDescr();
00150 
00151         if (strncmp(buf, "ShutDown", 8) == 0)
00152         {
00153             ILOG_WARN("Received shut down request from " << curCon <<
00154                       "; shutting down now");
00155             exit(-99);
00156         }
00157 
00158         else if (strncmp(buf, "ping", 4) == 0)
00159         {
00160             ILOG_DEBUG("Received ping request from " << curCon);
00161             sprintf(buf, "OK\0");
00162         }
00163 
00164         else if ((port > mFirstPort) && mDoDynaPorts &&
00165                  (conn != mPortAssignment[port]))
00166         {
00167             ILOG_WARN("Illegal request from " << conn << " at port " << port <<
00168                       "; port assigned to " << mPortAssignment[port]);
00169             sprintf(buf, "ERROR\0");
00170         }
00171 
00172         else if (strncmp(buf, "PortMode", 8) == 0)
00173             AcceptRequestPortMode(buf, len, bufSize, conn, port);
00174 
00175         else if (strncmp(buf, "PortAssignment", 14) == 0)
00176             AcceptRequestPortAssignment(buf, len, bufSize, conn, port);
00177 
00178         else
00179             return -1;
00180 
00181         return strlen(buf) + 1;
00182     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:39:42 2010 for ImpalaSrc by  doxygen 1.5.1