tvhlog: fix the tvhlog_limit() plus linuxdvb quick-fix
This commit is contained in:
parent
b7ff47f633
commit
17319d4927
2 changed files with 4 additions and 3 deletions
|
@ -446,7 +446,7 @@ linuxdvb_frontend_monitor ( void *aux )
|
|||
signal_status_t sigstat;
|
||||
streaming_message_t sm;
|
||||
service_t *s;
|
||||
int logit;
|
||||
int logit = 0;
|
||||
#if DVB_VER_ATLEAST(5,10)
|
||||
struct dtv_property fe_properties[6];
|
||||
struct dtv_properties dtv_prop;
|
||||
|
|
|
@ -68,8 +68,9 @@ void _tvhlog_hexdump ( const char *file, int line,
|
|||
static inline void tvhlog_limit_reset ( tvhlog_limit_t *limit )
|
||||
{ limit->last = 0; limit->count = 0; }
|
||||
static inline int tvhlog_limit ( tvhlog_limit_t *limit, uint32_t delay )
|
||||
{ time_t t = dispatch_clock; int res = limit->last + delay < t;
|
||||
limit->count++; limit->last = t; return res; }
|
||||
{ time_t t = dispatch_clock; limit->count++;
|
||||
if (limit->last + delay < t) { limit->last = t; return 1; }
|
||||
return 0; }
|
||||
|
||||
|
||||
/* Options */
|
||||
|
|
Loading…
Add table
Reference in a new issue