Browse Source

Bugfix: icarus: Silence false epoll error

Luke Dashjr 13 years ago
parent
commit
49d03dfa2d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      driver-icarus.c

+ 2 - 1
driver-icarus.c

@@ -193,7 +193,7 @@ int icarus_gets(unsigned char *buf, int fd, struct timeval *tv_finish, struct th
 	};
 	};
 	struct epoll_event evr[2];
 	struct epoll_event evr[2];
 	int epoll_timeout = ICARUS_READ_FAULT_DECISECONDS * 100;
 	int epoll_timeout = ICARUS_READ_FAULT_DECISECONDS * 100;
-	if (thr && thr->work_restart_fd != -1)
+	if (thr && thr->work_restart_fd != -1) {
 	epollfd = epoll_create(2);
 	epollfd = epoll_create(2);
 	if (epollfd != -1) {
 	if (epollfd != -1) {
 		if (-1 == epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &ev)) {
 		if (-1 == epoll_ctl(epollfd, EPOLL_CTL_ADD, fd, &ev)) {
@@ -213,6 +213,7 @@ int icarus_gets(unsigned char *buf, int fd, struct timeval *tv_finish, struct th
 	}
 	}
 	else
 	else
 		applog(LOG_ERR, "Icarus: Error creating epoll");
 		applog(LOG_ERR, "Icarus: Error creating epoll");
+	}
 #endif
 #endif
 
 
 	// Read reply 1 byte at a time to get earliest tv_finish
 	// Read reply 1 byte at a time to get earliest tv_finish