report a problem!

"Hong Liu" <[email protected]>
Newsgroups gmane.comp.video.videolan.vls.devel
Message-ID <[email protected]>
Hello,

I find a question in the function of C_Socket*
C_SocketPool::InternalMonitor(Struct timeval* pTimeOut) in your socket.cpp
file.
The original file is as follows:

for(unsigned int i = 0; i < m_vRecvSockets.Size(); i++)
    {
      if(m_hHigherSocket < m_vRecvSockets[i].m_hSocket)
        m_hHigherSocket = m_vRecvSockets[i].m_hSocket;

      FD_SET(m_vRecvSockets[i].m_hSocket, &sRecvSet);
    }

    fd_set sSendSet;
    FD_ZERO(&sSendSet);
    for(unsigned int j = 0; j < m_vSendSockets.Size(); j++)
    {
      if(m_hHigherSocket < m_vRecvSockets[j].m_hSocket) //comment: here is
the problem. It should be changed as if(m_hHigherSocket <
m_vSendSockets.m_hSocket)
        m_hHigherSocket = m_vRecvSockets[j].m_hSocket;  //
m_hHigherSocket = m_vSendSockets.m_hSocket;

      FD_SET(m_vSendSockets[j].m_hSocket, &sSendSet);
    }

    fd_set sExceptSet;
    FD_ZERO(&sExceptSet);
    for(unsigned int k = 0; k < m_vExceptSockets.Size(); k++)
    {
      if(m_hHigherSocket < m_vRecvSockets[k].m_hSocket) //comment: here is
the problem. It should be changed as if(m_hHigherSocket <
m_vExceptSockets.m_hSocket)
        m_hHigherSocket = m_vRecvSockets[k].m_hSocket;  //
m_hHigherSocket = m_vExceptSockets.m_hSocket;

      FD_SET(m_vExceptSockets[k].m_hSocket, &sExceptSet);
    }

    // Monitor the sockets
    if(!pTimeOut)
      iRc = select(m_hHigherSocket+1, &sRecvSet, &sSendSet, &sExceptSet,
NULL);
    else
    {
      struct timeval sTv;
      memcpy(&sTv, pTimeOut, sizeof(sTv));
      iRc = select(m_hHigherSocket+1, &sRecvSet, &sSendSet, &sExceptSet,
&sTv);
    }

Do you think it is right or not?

The second question is as follows,

core/network.cpp:188:  Session* pSession = new Session(pClientSocket,
m_pParam);

My question is that I could not find class Session definition and typedef
Session. So could you give me a clue to understand the above statement.

Thank you!

Hong Liu


-- 
This is the vls-devel mailing-list, see http://www.videolan.org/vls-devel/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.