summaryrefslogtreecommitdiffstats
path: root/workspace/customdhcpcd
diff options
context:
space:
mode:
authorNiklas2011-08-30 15:03:25 +0200
committerNiklas2011-08-30 15:03:25 +0200
commit34e522bcad11b1264a92e46379991fb4d344f1d1 (patch)
treee317e1b5f910e390ee4b1eae4e90df91ca78dc91 /workspace/customdhcpcd
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/customdhcpcd')
-rw-r--r--workspace/customdhcpcd/src/Makefile2
-rwxr-xr-xworkspace/customdhcpcd/src/customdhcpcdbin0 -> 173204 bytes
-rw-r--r--workspace/customdhcpcd/src/dhcpcd.c2
-rw-r--r--workspace/customdhcpcd/src/logwriter.c1
4 files changed, 3 insertions, 2 deletions
diff --git a/workspace/customdhcpcd/src/Makefile b/workspace/customdhcpcd/src/Makefile
index 13d9f28..7f90db4 100644
--- a/workspace/customdhcpcd/src/Makefile
+++ b/workspace/customdhcpcd/src/Makefile
@@ -2,7 +2,7 @@
# Our mk stubs also work with GNU make.
# Copyright 2008 Roy Marples <roy@marples.name>
-PROG= dhcpcd
+PROG= customdhcpcd
SRCS= arp.c client.c common.c configure.c dhcp.c dhcpcd.c duid.c \
info.c interface.c ipv4ll.c logger.c logwriter.c signal.c socket.c
MAN= dhcpcd.8
diff --git a/workspace/customdhcpcd/src/customdhcpcd b/workspace/customdhcpcd/src/customdhcpcd
new file mode 100755
index 0000000..38b7696
--- /dev/null
+++ b/workspace/customdhcpcd/src/customdhcpcd
Binary files differ
diff --git a/workspace/customdhcpcd/src/dhcpcd.c b/workspace/customdhcpcd/src/dhcpcd.c
index f8f003c..9f91239 100644
--- a/workspace/customdhcpcd/src/dhcpcd.c
+++ b/workspace/customdhcpcd/src/dhcpcd.c
@@ -665,9 +665,9 @@ abort:
free (dhcpcd_skiproutes);
#endif
- closeQtLoggerSocket();
logger (LOG_INFO, "exiting");
logToQt(LOG_INFO, DHCPCD_EXIT, "exiting due abort");
+ closeQtLoggerSocket();
exit (retval);
/* NOTREACHED */
}
diff --git a/workspace/customdhcpcd/src/logwriter.c b/workspace/customdhcpcd/src/logwriter.c
index 2ef257c..a6adbe3 100644
--- a/workspace/customdhcpcd/src/logwriter.c
+++ b/workspace/customdhcpcd/src/logwriter.c
@@ -97,6 +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);
}
void logToQt(int status, int substatus, const char * msg) {