|
|
@ -234,23 +234,23 @@ static int avalon_gets(int fd, uint8_t *buf, int read_count, |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
rc++; |
|
|
|
if (thr && thr->work_restart) { |
|
|
|
if (rc >= read_count) { |
|
|
|
|
|
|
|
if (opt_debug) { |
|
|
|
if (opt_debug) { |
|
|
|
applog(LOG_WARNING, |
|
|
|
applog(LOG_WARNING, |
|
|
|
"Avalon: No data in %.2f seconds", |
|
|
|
"Avalon: Work restart at %.2f seconds", |
|
|
|
(float)rc/(float)AVALON_TIME_FACTOR); |
|
|
|
(float)(rc)/(float)AVALON_TIME_FACTOR); |
|
|
|
} |
|
|
|
} |
|
|
|
return AVA_GETS_TIMEOUT; |
|
|
|
return AVA_GETS_RESTART; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (thr && thr->work_restart) { |
|
|
|
rc++; |
|
|
|
|
|
|
|
if (rc >= read_count) { |
|
|
|
if (opt_debug) { |
|
|
|
if (opt_debug) { |
|
|
|
applog(LOG_WARNING, |
|
|
|
applog(LOG_WARNING, |
|
|
|
"Avalon: Work restart at %.2f seconds", |
|
|
|
"Avalon: No data in %.2f seconds", |
|
|
|
(float)(rc)/(float)AVALON_TIME_FACTOR); |
|
|
|
(float)rc/(float)AVALON_TIME_FACTOR); |
|
|
|
} |
|
|
|
} |
|
|
|
return AVA_GETS_RESTART; |
|
|
|
return AVA_GETS_TIMEOUT; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|