diff options
author | Niklas | 2011-09-01 09:13:25 +0200 |
---|---|---|
committer | Niklas | 2011-09-01 09:13:25 +0200 |
commit | 61f3b8b4b9fc460efa6d236f5422fe7a59101090 (patch) | |
tree | c639569a4f9b6928f8044d7dc01a3699c4840863 | |
parent | changed sleep(1) to usleep(500) after every send to socket in logwriter.c Ma... (diff) | |
download | fbgui-61f3b8b4b9fc460efa6d236f5422fe7a59101090.tar.gz fbgui-61f3b8b4b9fc460efa6d236f5422fe7a59101090.tar.xz fbgui-61f3b8b4b9fc460efa6d236f5422fe7a59101090.zip |
some minor changes
-rwxr-xr-x | workspace/LogReceiver/LogReceiver | bin | 122366 -> 122376 bytes | |||
-rw-r--r-- | workspace/LogReceiver/logreceiver.cpp | 17 | ||||
-rwxr-xr-x | workspace/customdhcpcd/src/customdhcpcd | bin | 173205 -> 173171 bytes | |||
-rw-r--r-- | workspace/customdhcpcd/src/logwriter.c | 2 |
4 files changed, 17 insertions, 2 deletions
diff --git a/workspace/LogReceiver/LogReceiver b/workspace/LogReceiver/LogReceiver Binary files differindex 0aaf570..a16897b 100755 --- a/workspace/LogReceiver/LogReceiver +++ b/workspace/LogReceiver/LogReceiver 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; } } diff --git a/workspace/customdhcpcd/src/customdhcpcd b/workspace/customdhcpcd/src/customdhcpcd Binary files differindex c1b9cc1..5ef34d0 100755 --- a/workspace/customdhcpcd/src/customdhcpcd +++ b/workspace/customdhcpcd/src/customdhcpcd 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) { |