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

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

Definition at line 185 of file ChannelServer.h.

References Impala::Util::ChannelAuthorization::AllowRead(), Impala::Util::ChannelAuthorization::AllowWrite(), ConnectionDescr(), ILOG_DEBUG, ILOG_WARN, mAuthorization, mDoDynaPorts, mFirstPort, mStaticPortAllowWrite, ReadQuotedString(), and Impala::Util::ChannelAuthorization::Valid().

Referenced by AcceptRequest().

00187     {
00188         String curCon = ConnectionDescr();
00189         ILOG_DEBUG("Receiving port mode request from " << curCon);
00190         int index = 14;
00191         String readPass = ReadQuotedString(buf, index, len);
00192         if (! (mAuthorization.Valid() && mAuthorization.AllowRead(readPass)))
00193         {
00194             ILOG_WARN("Authorization failed");
00195             sprintf(buf, "Permission denied\0");
00196             return;
00197         }
00198 
00199         if (mDoDynaPorts)
00200         {
00201             sprintf(buf, "Dynamic\0");
00202             if (port != mFirstPort)
00203             {
00204                 ILOG_WARN("Port mode request from " << curCon <<
00205                           " should have been targeted at port " << mFirstPort);
00206             }
00207         }
00208         else
00209         {
00210             sprintf(buf, "Static\0", port);
00211             index += 7;
00212             String writePass = ReadQuotedString(buf, index, len);
00213             mStaticPortAllowWrite = mAuthorization.AllowWrite(writePass);
00214         }
00215     }

Here is the call graph for this function:


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