summaryrefslogtreecommitdiffstats
path: root/workspace/LogReceiver/logreceiver.h
diff options
context:
space:
mode:
authorNiklas2011-08-30 15:03:25 +0200
committerNiklas2011-08-30 15:03:25 +0200
commit34e522bcad11b1264a92e46379991fb4d344f1d1 (patch)
treee317e1b5f910e390ee4b1eae4e90df91ca78dc91 /workspace/LogReceiver/logreceiver.h
parenttried to fix the message loss problem, but failed. TODO: debug and socket sni... (diff)
downloadfbgui-34e522bcad11b1264a92e46379991fb4d344f1d1.tar.gz
fbgui-34e522bcad11b1264a92e46379991fb4d344f1d1.tar.xz
fbgui-34e522bcad11b1264a92e46379991fb4d344f1d1.zip
added check for file existens. renamed the dhcpcd bin to customdhcpcd. temporal solution for the message loss problem => added a sleep(1) function after every send operation. this makes the programm a bit slower but it solves the problem, we now receive every message (issue 339)
Diffstat (limited to 'workspace/LogReceiver/logreceiver.h')
-rw-r--r--workspace/LogReceiver/logreceiver.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/workspace/LogReceiver/logreceiver.h b/workspace/LogReceiver/logreceiver.h
index 6611d15..6b32aa8 100644
--- a/workspace/LogReceiver/logreceiver.h
+++ b/workspace/LogReceiver/logreceiver.h
@@ -16,7 +16,7 @@ class LogReceiver: public QObject {
Q_OBJECT
#define DEFAULT_QTSOCKETADDRESS "/var/tmp/qt_c_socket_default"
-#define DEFAULT_PATHTODHCPCDEXE "/home/niklas/fbgui/workspace/customdhcpcd/src/dhcpcd"
+#define DEFAULT_PATHTODHCPCDEXE "/home/niklas/fbgui/workspace/customdhcpcd/src/customdhcpcd"
public:
LogReceiver();
@@ -32,6 +32,7 @@ private slots:
void handleNewInputLine(QString data);
void handleProcessFinished(int exitCode, QProcess::ExitStatus exitStatus);
void handleProcessStarted();
+ void handleClientDisconnect();
signals:
void addNewInterface(QString ifName);
@@ -47,6 +48,7 @@ private:
//QMap<int, QNetworkInterface > interfacesMap;
//QMap<QString, int> indexToIfaceNameMap;
QMap<QLocalSocket *, QLocalSocket *> clients;
+ QLocalSocket * client;
QMap<QProcess*, QString> clientProcessToIfNameMap;
QString pathToDhcpcdExe;
QStringList dhcpcdArguments;
@@ -54,6 +56,8 @@ private:
QNetworkAccessManager *accessManager;
int numberOfProcesses;
+ void handleNewInput(QLocalSocket * client);
+
void runDHCPCD(QList<QString> &interfaces);
void runDHCPCD(QString interface);
QList<QString>checkCarrierState(QList<QString> &interfaces);