void ConfigDialog::connectButtonClicked() { if(ui->connectButton->text().remove('&')=="Connect"){ ui->serverAddress->setEnabled(false); ui->serverPort->setEnabled(false); ui->remoteName->setEnabled(false); ui->connectButton->setEnabled(false); ui->connectButton->setText("Connecting"); emit connectRemote(ui->serverAddress->text(), ui->serverPort->value(), ui->remoteName->text()); autoConnect= true; }else if(ui->connectButton->text().remove('&') == "Disconnect"){ emit disconnectRemote(); autoConnect = false; } }
void SCI_Transporter::disconnectImpl() { DBUG_ENTER("SCI_Transporter::disconnectImpl"); sci_error_t err; if(m_mapped){ setDisconnect(); DBUG_PRINT("info", ("connect status = %d, remote node = %d", (int)getConnectionStatus(), remoteNodeId)); disconnectRemote(); disconnectLocal(); } // Empty send buffer m_sendBuffer.m_dataSize = 0; m_initLocal=false; m_mapped = false; if(m_sciinit) { for(Uint32 i=0; i<m_adapters ; i++) { SCIClose(sciAdapters[i].scidesc, FLAGS, &err); if(err != SCI_ERR_OK) { report_error(TE_SCI_UNABLE_TO_CLOSE_CHANNEL); DBUG_PRINT("error", ("Cannot close channel to the driver. Error code 0x%x", err)); } } } m_sciinit=false; #ifdef DEBUG_TRANSPORTER ndbout << "total: " << i1024+ i10242048 + i2048+i2049 << endl; ndbout << "<1024: " << i1024 << endl; ndbout << "1024-2047: " << i10242048 << endl; ndbout << "==2048: " << i2048 << endl; ndbout << "2049-4096: " << i20484096 << endl; ndbout << "==4096: " << i4096 << endl; ndbout << ">4096: " << i4097 << endl; #endif DBUG_VOID_RETURN; }
void SCI_Transporter::closeSCI() { // Termination of SCI sci_error_t err; DBUG_ENTER("SCI_Transporter::closeSCI"); // Disconnect and remove remote segment disconnectRemote(); // Unmap and remove local segment disconnectLocal(); // Closes an SCI virtual device SCIClose(activeSCIDescriptor, FLAGS, &err); if(err != SCI_ERR_OK) { DBUG_PRINT("error", ("Cannot close SCI channel to the driver. Error code 0x%x", err)); } SCITerminate(); DBUG_VOID_RETURN; } // closeSCI()
void RemoteControlInterface::connexionTimeout() { if(!isConnected) disconnectRemote(); }