summaryrefslogtreecommitdiffstats
path: root/workspace/customdhcpcd/src/logwriter.c
diff options
context:
space:
mode:
authorNiklas2011-08-30 16:16:30 +0200
committerNiklas2011-08-30 16:16:30 +0200
commit0c23447d55c144c6c7e2bfb1b526a64bb5051f2e (patch)
tree745cabb945a4f5a53e642199aae78b4263f2fd8d /workspace/customdhcpcd/src/logwriter.c
parentadded check for file existens. renamed the dhcpcd bin to customdhcpcd. tempo... (diff)
downloadfbgui-0c23447d55c144c6c7e2bfb1b526a64bb5051f2e.tar.gz
fbgui-0c23447d55c144c6c7e2bfb1b526a64bb5051f2e.tar.xz
fbgui-0c23447d55c144c6c7e2bfb1b526a64bb5051f2e.zip
changed sleep(1) to usleep(500) after every send to socket in logwriter.c Main Problem with this workaround: with increasing number of messages, the program will become slower and slower. also added a new map in which i store the pair (interfacename, qlocalsocket client) with this i can check if there are still some messages left, when a process finishes
Diffstat (limited to 'workspace/customdhcpcd/src/logwriter.c')
-rw-r--r--workspace/customdhcpcd/src/logwriter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/workspace/customdhcpcd/src/logwriter.c b/workspace/customdhcpcd/src/logwriter.c
index a6adbe3..77a662c 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);
}
- sleep(1);
+ usleep(500);
}
void logToQt(int status, int substatus, const char * msg) {