Logo Search packages:      
Sourcecode: qtsmbstatus version File versions  Download package

void ClientSocket::slot_pam (  )  [private, slot]

test if pamthread has terminated

Definition at line 342 of file clientsocket.cpp.

References PamThread::auth_resu, AuthUser, infoserver(), permitDisconnectUser, permitSendMsg, sendToClient(), and socketConnectionClose().

{
      debugQt ("ClientSocket::slot_pam()");
      if (pamthread->isFinished ())
      {
            // stop timer
            timer->stop();
            if (pamthread->auth_resu)
            {
                  // client authenticated
                  AuthUser=true;
                  sendToClient(auth_ack);
                  /*
                  infoserver : right for current client
                  0000 0001 : permit client to disconnect an user
                  0000 0010 : permit client to send popup messages (popupwindows)
                  */
                  int infoserver=0;
                  if (permitDisconnectUser) infoserver=1;
                  if (permitSendMsg) infoserver+=2;
                  // send client's rights
                  sendToClient(server_info,QString::number(infoserver));
            }
            else
            {
                  // client is not authenticated. disconnect it
                  sendToClient(error_auth);
                  socketConnectionClose();
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index