summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas2011-09-01 09:13:25 +0200
committerNiklas2011-09-01 09:13:25 +0200
commit61f3b8b4b9fc460efa6d236f5422fe7a59101090 (patch)
treec639569a4f9b6928f8044d7dc01a3699c4840863
parentchanged sleep(1) to usleep(500) after every send to socket in logwriter.c Ma... (diff)
downloadfbgui-61f3b8b4b9fc460efa6d236f5422fe7a59101090.tar.gz
fbgui-61f3b8b4b9fc460efa6d236f5422fe7a59101090.tar.xz
fbgui-61f3b8b4b9fc460efa6d236f5422fe7a59101090.zip
some minor changes
-rwxr-xr-xworkspace/LogReceiver/LogReceiverbin122366 -> 122376 bytes
-rw-r--r--workspace/LogReceiver/logreceiver.cpp17
-rwxr-xr-xworkspace/customdhcpcd/src/customdhcpcdbin173205 -> 173171 bytes
-rw-r--r--workspace/customdhcpcd/src/logwriter.c2
4 files changed, 17 insertions, 2 deletions
diff --git a/workspace/LogReceiver/LogReceiver b/workspace/LogReceiver/LogReceiver
index 0aaf570..a16897b 100755
--- a/workspace/LogReceiver/LogReceiver
+++ b/workspace/LogReceiver/LogReceiver
Binary files 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:" <<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
index c1b9cc1..5ef34d0 100755
--- a/workspace/customdhcpcd/src/customdhcpcd
+++ b/workspace/customdhcpcd/src/customdhcpcd
Binary files 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) {