From: Roy Marples Date: Tue, 12 Nov 2013 17:09:29 +0000 (+0000) Subject: Warn if dev is started more than once. X-Git-Tag: v6.2.0~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2072e4c6eb7b556eb6925c05cd017b0e935847a;p=thirdparty%2Fdhcpcd.git Warn if dev is started more than once. --- diff --git a/dev.c b/dev.c index d9a65a72..b33a3e00 100644 --- 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) {