summaryrefslogtreecommitdiffstats
path: root/workspace/LogReceiver/logreceiver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'workspace/LogReceiver/logreceiver.cpp')
-rw-r--r--workspace/LogReceiver/logreceiver.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/workspace/LogReceiver/logreceiver.cpp b/workspace/LogReceiver/logreceiver.cpp
index 9bc86e3..802f442 100644
--- a/workspace/LogReceiver/logreceiver.cpp
+++ b/workspace/LogReceiver/logreceiver.cpp
@@ -246,6 +246,7 @@ void LogReceiver::checkInternetConnectionViaTCP(QString ifName) {
session->open();
if (session->waitForOpened(-1)) {
+ qDebug () << "used interface for connectivity check:" <<session->interface().humanReadableName();
QTcpSocket *tcpSocket = new QTcpSocket(this);
tcpSocket->connectToHost(QString("209.85.148.105"), 80);
if (!tcpSocket->waitForConnected(2000)) {
@@ -302,6 +303,18 @@ void LogReceiver::handleNewInput() {
QLocalSocket * client = clients.value(socket);
+ while(!client->atEnd()) {
+ QString data(client->readLine());
+
+ data = data.trimmed();
+ //qDebug() << data;
+ QStringList lines = data.split("\n");
+
+ for (int i = 0; i < lines.length(); i++) {
+ handleNewInputLine(client, lines.at(i));
+ }
+ }
+/*
QString data(client->readAll());
data = data.trimmed();
@@ -311,6 +324,7 @@ void LogReceiver::handleNewInput() {
for (int i = 0; i < lines.length(); i++) {
handleNewInputLine(client, lines.at(i));
}
+ */
}
void LogReceiver::handleNewInputLine(QLocalSocket * client, QString data) {
@@ -377,7 +391,8 @@ void LogReceiver::handleNewInputLine(QLocalSocket * client, QString data) {
qDebug() << "received stat_error";
break;
default:
- qDebug() << logMsg;
+ //qDebug() << logMsg;
+ break;
}
}