unsigned char sample_enabled = 0;
while(!return_value) {
memcpy(&tmpfds, &readfds, sizeof(tmpfds));
- timeout.tv_sec = 0;
- timeout.tv_usec = 1000000;
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
int ret = select(max_fd+1, &tmpfds, NULL, NULL, &timeout);
if(ret == -1 && errno != EINTR) {
log_printf(ERROR, "autosample process select returned with error: %s", strerror(errno));
FD_SET(cmd_listen_fd, &readfds);
int max_fd = tty_fd > cmd_listen_fd ? tty_fd : cmd_listen_fd;
- int autosample_enabled = 0;
+ u_int8_t autosample_enabled = 0;
if(autosample->pid_ > 0) {
clear_fd(autosample->write_fd_);
FD_SET(autosample->write_fd_, &readfds);