]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Warn if dev is started more than once.
authorRoy Marples <roy@marples.name>
Tue, 12 Nov 2013 17:09:29 +0000 (17:09 +0000)
committerRoy Marples <roy@marples.name>
Tue, 12 Nov 2013 17:09:29 +0000 (17:09 +0000)
dev.c

diff --git a/dev.c b/dev.c
index d9a65a72e708dfbe385c88f6d83f2aca86657f42..b33a3e005eb22a17f62b509e55180226f6add506 100644 (file)
--- a/dev.c
+++ b/dev.c
@@ -159,6 +159,11 @@ int
 dev_start(const char *plugin)
 {
 
+       if (fd != -1) {
+               syslog(LOG_ERR, "%s: already started on fd %d", __func__, fd);
+               return fd;
+       }
+
        fd = dev_start1(plugin);
        if (fd != -1) {
                if (eloop_event_add(fd, dev_handle_data, NULL) == -1) {