Browse Source

If there is no input don't report other events

Georgi Chorbadzhiyski 7 years ago
parent
commit
29a5a7ad2f
2 changed files with 3 additions and 3 deletions
  1. 1
    1
      camd.c
  2. 2
    2
      tsdecrypt.c

+ 1
- 1
camd.c View File

185
 		ts->is_cw_error = 1;
185
 		ts->is_cw_error = 1;
186
 		if (ts->key.ts && now - ts->key.ts > KEY_VALID_TIME) {
186
 		if (ts->key.ts && now - ts->key.ts > KEY_VALID_TIME) {
187
 			if (c->key->is_valid_cw) {
187
 			if (c->key->is_valid_cw) {
188
-				if (!ts->stream_is_not_scrambled || !ts->have_valid_pmt) {
188
+				if (!ts->stream_is_not_scrambled || !ts->have_valid_pmt || ts->no_input) {
189
 					notify(ts, "NO_CODE_WORD", "No code word was set in %ld sec. Decryption is disabled.",
189
 					notify(ts, "NO_CODE_WORD", "No code word was set in %ld sec. Decryption is disabled.",
190
 						now - ts->key.ts);
190
 						now - ts->key.ts);
191
 					ts_LOGf("CW  | *ERR* No valid code word was received in %ld seconds. Decryption is disabled.\n",
191
 					ts_LOGf("CW  | *ERR* No valid code word was received in %ld seconds. Decryption is disabled.\n",

+ 2
- 2
tsdecrypt.c View File

861
 }
861
 }
862
 
862
 
863
 static void report_ecms(struct ts *ts, time_t now) {
863
 static void report_ecms(struct ts *ts, time_t now) {
864
-	if ((ts->stream_is_not_scrambled || !ts->have_valid_pmt) && ts->ecm_seen_count == 0)
864
+	if ((ts->stream_is_not_scrambled || !ts->have_valid_pmt || ts->no_input) && ts->ecm_seen_count == 0)
865
 		return;
865
 		return;
866
 	ts_LOGf("ECM | Received %u (%u dup) and processed %u in %lu seconds.\n",
866
 	ts_LOGf("ECM | Received %u (%u dup) and processed %u in %lu seconds.\n",
867
 		ts->ecm_seen_count,
867
 		ts->ecm_seen_count,
875
 }
875
 }
876
 
876
 
877
 static void report_cw_warn(struct ts *ts, time_t now) {
877
 static void report_cw_warn(struct ts *ts, time_t now) {
878
-	if (ts->stream_is_not_scrambled || !ts->have_valid_pmt)
878
+	if (ts->stream_is_not_scrambled || !ts->have_valid_pmt || ts->no_input)
879
 		return;
879
 		return;
880
 	if (now - ts->key.ts > 1) {
880
 	if (now - ts->key.ts > 1) {
881
 		notify(ts, "NO_CODE_WORD", "No valid code word was received in %ld sec.",
881
 		notify(ts, "NO_CODE_WORD", "No valid code word was received in %ld sec.",

Loading…
Cancel
Save