KMessageBox::error(0,i18n("<qt>Unable to establish Kerberos protocol with remote server<p>Please verify that you currently hold a valid Kerberos ticket</qt>"),i18n("Connection Failed"));
// Read magic number and proto version from server
TQDataStreamds(m_socket);
TQ_UINT32magicnum;
TQ_UINT32protover;
ds>>magicnum;
ds>>protover;
printf("[DEBUG] Got magic number %d and protocol version %d\n\r",magicnum,protover);fflush(stdout);
// Request connection to backend server
TQStringresponse;
ds<<TQString("SERV");
ds<<TQString(CLIENT_LIBRARY);
ds>>response;
printf("[RAJA DEBUG 400.0] Got '%s' from the server\n\r",response.ascii());fflush(stdout);
if(response=="OK"){
m_connectionMutex->unlock();
return0;
connToServerState=3;
connToServerConnecting=false;
processLockouts();
return;
}
elseif(response=="ERRNOCONN"){
connToServerState=-1;
connToServerConnecting=false;
disconnectFromServer();
KMessageBox::error(0,i18n("<qt>Unable to establish connection with backend server<p>Please verify that you are currently connected to a workspace</qt>"),i18n("Connection Failed"));
m_connectionMutex->unlock();
return-1;
return;
}
elseif(response=="ERRNOTAVL"){
connToServerState=-1;
connToServerConnecting=false;
disconnectFromServer();
KMessageBox::error(0,i18n("<qt>The backend server is not available at this time<p>Please try a different workspace, or try again later</qt>"),i18n("Connection Failed"));
m_connectionMutex->unlock();
return-1;
return;
}
elseif(response=="ERRNOSERV"){
connToServerState=-1;
connToServerConnecting=false;
disconnectFromServer();
KMessageBox::error(0,i18n("<qt>The active laboratory workspace does not support the requested service</qt>"),i18n("Service Unavailable"));
m_connectionMutex->unlock();
return-1;
return;
}
else{
connToServerState=-1;
connToServerConnecting=false;
disconnectFromServer();
KMessageBox::error(0,i18n("<qt>Unable to establish connection with remote server</qt>"),i18n("Connection Failed"));