From c3ce002a54ec165bbdc76c70d054b885de75435a Mon Sep 17 00:00:00 2001 From: aavit Date: Mon, 11 Apr 2011 15:34:06 +0200 Subject: Improve error reporting on failure to connect to baseline server (cherry picked from commit 9d75ff6fa8f8844ff6599b68618821cd8c501757) --- tests/arthur/baselineserver/src/baselineserver.cpp | 1 + tests/arthur/common/baselineprotocol.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/arthur/baselineserver/src/baselineserver.cpp b/tests/arthur/baselineserver/src/baselineserver.cpp index 0c0871ae6f..c22d1f8c12 100644 --- a/tests/arthur/baselineserver/src/baselineserver.cpp +++ b/tests/arthur/baselineserver/src/baselineserver.cpp @@ -162,6 +162,7 @@ bool BaselineHandler::establishConnection() { if (!proto.acceptConnection(&plat)) { qWarning() << runId << logtime() << "Accepting new connection from" << proto.socket.peerAddress().toString() << "failed." << proto.errorMessage(); + proto.sendBlock(BaselineProtocol::Abort, proto.errorMessage().toLatin1()); // In case the client can hear us, tell it what's wrong. proto.socket.disconnectFromHost(); return false; } diff --git a/tests/arthur/common/baselineprotocol.cpp b/tests/arthur/common/baselineprotocol.cpp index 88cea362ee..d5e533abba 100644 --- a/tests/arthur/common/baselineprotocol.cpp +++ b/tests/arthur/common/baselineprotocol.cpp @@ -374,7 +374,7 @@ bool BaselineProtocol::connect(const QString &testCase, bool *dryrun) Command cmd = UnknownError; if (!receiveBlock(&cmd, &block)) { - errMsg += QLS("Failed to get response from server."); + errMsg.prepend(QLS("Failed to get response from server. ")); return false; } -- cgit v1.2.3