summaryrefslogtreecommitdiffstats
path: root/clients/tde/src/app/remotemdi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clients/tde/src/app/remotemdi.cpp')
-rw-r--r--clients/tde/src/app/remotemdi.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/clients/tde/src/app/remotemdi.cpp b/clients/tde/src/app/remotemdi.cpp
index eec5144..0ae6680 100644
--- a/clients/tde/src/app/remotemdi.cpp
+++ b/clients/tde/src/app/remotemdi.cpp
@@ -215,6 +215,8 @@ void RemoteMDI::finishConnectingToServer() {
KMessageBox::error(this, 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"));
}
else {
+ connect(m_rsvSvrSocket, SIGNAL(readyRead()), m_rsvSvrSocket, SLOT(processPendingData()));
+ m_rsvSvrSocket->processPendingData();
connToServerState = 2;
}
}
@@ -223,10 +225,18 @@ void RemoteMDI::finishConnectingToServer() {
// Connection established!
// Read magic number and proto version from server
TQDataStream* ds = new TQDataStream(m_rsvSvrSocket);
+ ds->setPrintableData(true);
+ while (!m_rsvSvrSocket->canReadFrame()) {
+ tqApp->processEvents();
+ if (!m_rsvSvrSocket) {
+ return;
+ }
+ }
TQ_UINT32 magicnum;
TQ_UINT32 protover;
*ds >> magicnum;
*ds >> protover;
+ m_rsvSvrSocket->clearFrameTail();
printf("[DEBUG] Got magic number %d and protocol version %d\n\r", magicnum, protover); fflush(stdout);
delete ds;
if ((magicnum == MAGIC_NUMBER) && (protover == PROTOCOL_VERSION)) {
@@ -285,11 +295,20 @@ void RemoteMDI::promptForStationType() {
}
TQDataStream ds(m_rsvSvrSocket);
+ ds.setPrintableData(true);
// Request list of laboratory stations
StationList slist;
ds << TQString("LIST");
+ m_rsvSvrSocket->writeEndOfFrame();
+ while (!m_rsvSvrSocket->canReadFrame()) {
+ tqApp->processEvents();
+ if (!m_rsvSvrSocket) {
+ return;
+ }
+ }
ds >> slist;
+ m_rsvSvrSocket->clearFrameTail();
printf("[RAJA DEBUG 200.2] Got list of stations, count is %d\n\r", slist.count()); fflush(stdout);
@@ -298,8 +317,17 @@ void RemoteMDI::promptForStationType() {
if (ret == KDialog::Accepted) {
TQString result;
ds << TQString("BIND");
+ m_rsvSvrSocket->writeEndOfFrame();
ds << select.m_selectedStation;
+ m_rsvSvrSocket->writeEndOfFrame();
+ while (!m_rsvSvrSocket->canReadFrame()) {
+ tqApp->processEvents();
+ if (!m_rsvSvrSocket) {
+ return;
+ }
+ }
ds >> result;
+ m_rsvSvrSocket->clearFrameTail();
printf("[RAJA DEBUG 100.0] '%s'\n\r", result.ascii()); fflush(stdout);
if (result == "OK") {
// Success!