summaryrefslogtreecommitdiff
path: root/cppe/demo
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2005-08-08 16:03:59 +0000
committerDwayne Boone <dwayne@zeroc.com>2005-08-08 16:03:59 +0000
commit7793ab2e94ca04d75e985cf9e6d87f6d409c0a0d (patch)
treeea8a29ec5338cb5a1008da2504cb225f9dbce638 /cppe/demo
parentRemoved some crud (diff)
downloadice-7793ab2e94ca04d75e985cf9e6d87f6d409c0a0d.tar.bz2
ice-7793ab2e94ca04d75e985cf9e6d87f6d409c0a0d.tar.xz
ice-7793ab2e94ca04d75e985cf9e6d87f6d409c0a0d.zip
Fixed to work with batch disabled
Diffstat (limited to 'cppe/demo')
-rw-r--r--cppe/demo/IceE/MFC/client/HelloClientDlg.cpp21
-rw-r--r--cppe/demo/IceE/MFC/server/config2
2 files changed, 22 insertions, 1 deletions
diff --git a/cppe/demo/IceE/MFC/client/HelloClientDlg.cpp b/cppe/demo/IceE/MFC/client/HelloClientDlg.cpp
index 951cdfadb8b..75b78fd99c5 100644
--- a/cppe/demo/IceE/MFC/client/HelloClientDlg.cpp
+++ b/cppe/demo/IceE/MFC/client/HelloClientDlg.cpp
@@ -60,6 +60,15 @@ CHelloClientDlg::OnInitDialog()
//
_mode->SetCurSel(_currentMode);
+
+ //
+ // Disable flush button if built without batch support.
+ //
+#ifndef ICEE_HAS_BATCH
+ (CButton*)GetDlgItem(IDC_FLUSH)->EnableWindow(FALSE);
+#endif
+
+
//
// Create the proxy.
//
@@ -123,11 +132,13 @@ CHelloClientDlg::OnSayHello()
{
updateProxy();
_currentProxy->sayHello();
+#ifdef ICEE_HAS_BATCH
if(_currentProxy->ice_isBatchOneway())
{
_status->SetWindowText(CString(" Queued batch request"));
}
else
+#endif
{
_status->SetWindowText(CString(" Sent request"));
}
@@ -141,6 +152,7 @@ CHelloClientDlg::OnSayHello()
void
CHelloClientDlg::OnFlush()
{
+#ifdef ICEE_HAS_BATCH
try
{
_communicator->flushBatchRequests();
@@ -150,6 +162,7 @@ CHelloClientDlg::OnFlush()
{
handleException(ex);
}
+#endif
}
void
@@ -159,11 +172,13 @@ CHelloClientDlg::OnShutdown()
{
updateProxy();
_currentProxy->shutdown();
+#ifdef ICEE_HAS_BATCH
if(_currentProxy->ice_isBatchOneway())
{
_status->SetWindowText(CString(" Queued shutdown request"));
}
else
+#endif
{
_status->SetWindowText(CString(" Sent shutdown request"));
}
@@ -194,8 +209,14 @@ CHelloClientDlg::updateProxy()
proxy = _proxy->ice_oneway();
break;
case 2:
+#ifdef ICEE_HAS_BATCH
proxy = _proxy->ice_batchOneway();
break;
+#else
+ AfxMessageBox(CString("Batch mode is currently not enabled."),
+ MB_OK|MB_ICONEXCLAMATION);
+ return;
+#endif
default:
assert(false);
}
diff --git a/cppe/demo/IceE/MFC/server/config b/cppe/demo/IceE/MFC/server/config
index aea4c3e6fae..45456e6f28a 100644
--- a/cppe/demo/IceE/MFC/server/config
+++ b/cppe/demo/IceE/MFC/server/config
@@ -16,7 +16,7 @@ Ice.Warn.Connections=1
# 2 = like 1, but more detailed
# 3 = like 2, but also trace data transfer
#
-Ice.Trace.Network=1
+Ice.Trace.Network=0
#
# Protocol Tracing