X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/hmcfgusb/blobdiff_plain/6262005e88c7c9edff4c0f962ca338ffb2a299fb..58151f8289c0da0d173bdfb0452e98dc784f64c2:/hmsniff.c diff --git a/hmsniff.c b/hmsniff.c index 1936d5b..39133d3 100644 --- a/hmsniff.c +++ b/hmsniff.c @@ -32,6 +32,7 @@ #include #include +#include "version.h" #include "hexdump.h" #include "hmcfgusb.h" @@ -206,11 +207,13 @@ int main(int argc, char **argv) continue; } else if (fd == -1) { if (errno) { - perror("hmcfgusb_poll"); - break; - } else { - /* periodically wakeup the device */ - hmcfgusb_send_null_frame(dev, 1); + if (errno != ETIMEDOUT) { + perror("hmcfgusb_poll"); + break; + } else { + /* periodically wakeup the device */ + hmcfgusb_send_null_frame(dev, 1); + } } } }