Browse Source

Fix 'detect encrypted inuot' logic, it was reversed

Georgi Chorbadzhiyski 6 years ago
parent
commit
7dd2c7cccd
2 changed files with 4 additions and 4 deletions
  1. 1
    1
      config.h
  2. 3
    3
      tomcast.c

+ 1
- 1
config.h View File

81
 	int					server_port;
81
 	int					server_port;
82
 	int					server_socket;
82
 	int					server_socket;
83
 	pthread_t			server_thread;
83
 	pthread_t			server_thread;
84
-	int					allow_encrypted_input;
84
+	int					detect_encrypted_input;
85
 
85
 
86
 	char				*channels_file;
86
 	char				*channels_file;
87
 
87
 

+ 3
- 3
tomcast.c View File

929
 				fdwrite(r->clientsock, reset, FRAME_PACKET_SIZE);
929
 				fdwrite(r->clientsock, reset, FRAME_PACKET_SIZE);
930
 			}
930
 			}
931
 
931
 
932
-			if (!config.allow_encrypted_input) {
932
+			if (config.detect_encrypted_input) {
933
 				int64_t now = get_time();
933
 				int64_t now = get_time();
934
 				int ret;
934
 				int ret;
935
 				if ((ret = ts_have_valid_pes((uint8_t *)buf, readen)) == 0) { // Is the output encrypted?
935
 				if ((ret = ts_have_valid_pes((uint8_t *)buf, readen)) == 0) { // Is the output encrypted?
1052
 				send_reset_opt = 1;
1052
 				send_reset_opt = 1;
1053
 				break;
1053
 				break;
1054
 			case 'E':
1054
 			case 'E':
1055
-				cfg->allow_encrypted_input = 1;
1055
+				cfg->detect_encrypted_input = 1;
1056
 				break;
1056
 				break;
1057
 			case 'H':
1057
 			case 'H':
1058
 			case 'h':
1058
 			case 'h':
1085
 	}
1085
 	}
1086
 	if (send_reset_opt)
1086
 	if (send_reset_opt)
1087
 		printf("\tSend reset packets.\n");
1087
 		printf("\tSend reset packets.\n");
1088
-	if (cfg->allow_encrypted_input)
1088
+	if (cfg->detect_encrypted_input)
1089
 		printf("\tDetect encrypted input.\n");
1089
 		printf("\tDetect encrypted input.\n");
1090
 	if (cfg->pidfile) {
1090
 	if (cfg->pidfile) {
1091
 		printf("\tDaemonize         : %s\n", cfg->pidfile);
1091
 		printf("\tDaemonize         : %s\n", cfg->pidfile);

Loading…
Cancel
Save