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,7 +185,7 @@ static int camd_send_ecm(struct ts *ts, struct camd_msg *msg) {
185 185
 		ts->is_cw_error = 1;
186 186
 		if (ts->key.ts && now - ts->key.ts > KEY_VALID_TIME) {
187 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 189
 					notify(ts, "NO_CODE_WORD", "No code word was set in %ld sec. Decryption is disabled.",
190 190
 						now - ts->key.ts);
191 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,7 +861,7 @@ static void report_emms(struct ts *ts, time_t now) {
861 861
 }
862 862
 
863 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 865
 		return;
866 866
 	ts_LOGf("ECM | Received %u (%u dup) and processed %u in %lu seconds.\n",
867 867
 		ts->ecm_seen_count,
@@ -875,7 +875,7 @@ static void report_ecms(struct ts *ts, time_t now) {
875 875
 }
876 876
 
877 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 879
 		return;
880 880
 	if (now - ts->key.ts > 1) {
881 881
 		notify(ts, "NO_CODE_WORD", "No valid code word was received in %ld sec.",

Loading…
Cancel
Save