Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tvhlog: fix the tvhlog_limit() plus linuxdvb quick-fix
  • Loading branch information
perexg committed Aug 20, 2014
1 parent b7ff47f commit 17319d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/input/mpegts/linuxdvb/linuxdvb_frontend.c
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions src/tvhlog.h
Expand Up @@ -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 */
Expand Down

0 comments on commit 17319d4

Please sign in to comment.