• R/O
  • HTTP
  • SSH
  • HTTPS

rec10-git: Commit

rec10 git


Commit MetaInfo

Revisionb2113915a2245bc8ee164571f3e34a3ecd4b08bc (tree)
Zeit2013-12-16 04:26:03
AutorLong.inus <long.inus@hotm...>
CommiterLong.inus

Log Message

tunerec: fix mrb_put remaining bytes calculation, include ctype.h

Ändern Zusammenfassung

Diff

--- a/tunerec/tunerec.c
+++ b/tunerec/tunerec.c
@@ -15,6 +15,7 @@
1515 #include <pthread.h>
1616 #include <stdbool.h>
1717 #include <string.h>
18+#include <ctype.h>
1819
1920 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
2021 #ifndef DTV_STREAM_ID
@@ -95,7 +96,7 @@ bool mrb_get(mrb* rb, char *target, size_t size) {
9596 // RingBuffer underflow.
9697 return false;
9798 }
98- if ( rb->rb_rt + size <= rb->rb_wt ) {
99+ if ( rb->rb_rt + size <= RING_BUFFER_SIZE ) {
99100 // read bytes + newly taken bytes <= buffer max size
100101 memcpy(target, rb->rb_ptr + rb->rb_rt, size);
101102 rb->rb_rt = rb->rb_rt + size;
Show on old repository browser