From 61f3b8b4b9fc460efa6d236f5422fe7a59101090 Mon Sep 17 00:00:00 2001 From: Niklas Date: Thu, 1 Sep 2011 09:13:25 +0200 Subject: some minor changes --- workspace/LogReceiver/LogReceiver | Bin 122366 -> 122376 bytes workspace/LogReceiver/logreceiver.cpp | 17 ++++++++++++++++- workspace/customdhcpcd/src/customdhcpcd | Bin 173205 -> 173171 bytes workspace/customdhcpcd/src/logwriter.c | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/workspace/LogReceiver/LogReceiver b/workspace/LogReceiver/LogReceiver index 0aaf570..a16897b 100755 Binary files a/workspace/LogReceiver/LogReceiver and b/workspace/LogReceiver/LogReceiver differ 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:" <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; } } diff --git a/workspace/customdhcpcd/src/customdhcpcd b/workspace/customdhcpcd/src/customdhcpcd index c1b9cc1..5ef34d0 100755 Binary files a/workspace/customdhcpcd/src/customdhcpcd and b/workspace/customdhcpcd/src/customdhcpcd differ diff --git a/workspace/customdhcpcd/src/logwriter.c b/workspace/customdhcpcd/src/logwriter.c index 77a662c..74c0181 100644 --- a/workspace/customdhcpcd/src/logwriter.c +++ b/workspace/customdhcpcd/src/logwriter.c @@ -97,7 +97,7 @@ void sendToQt(log_msg * msg) { syslog (LOG_ERR, "[fbgui] ERROR writing to socket: [%d:%d] %s (%s)", msg->status, msg->substatus, msg->msg, msg->device); // fprintf(stdout, "ERROR writing to socket: %s", msg); } - usleep(500); + //usleep(500); } void logToQt(int status, int substatus, const char * msg) { -- cgit v1.2.3-55-g7522