Browse Source

Check if ident is set when notify-program is configured.

Georgi Chorbadzhiyski 12 years ago
parent
commit
4d00f226bb
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      tsdecrypt.c

+ 5
- 4
tsdecrypt.c View File

@@ -218,7 +218,6 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
218 218
 				ts->syslog_port = atoi(optarg);
219 219
 				break;
220 220
 
221
-
222 221
 			case 'I':
223 222
 				input_addr_err = parse_io_param(&ts->input, optarg, O_RDONLY, 0);
224 223
 				break;
@@ -343,12 +342,14 @@ static void parse_options(struct ts *ts, int argc, char **argv) {
343 342
 				exit(0);
344 343
 		}
345 344
 	}
346
-	if (ts->syslog_active && !ts->ident[0])
347
-		ident_err = 1;
345
+	if (!ts->ident[0]) {
346
+		if (ts->syslog_active || ts->notify_program[0])
347
+			ident_err = 1;
348
+	}
348 349
 	if (ident_err || ca_err || server_err || input_addr_err || output_addr_err || ts->input.type == WTF_IO || ts->output.type == WTF_IO) {
349 350
 		show_help(ts);
350 351
 		if (ident_err)
351
-			fprintf(stderr, "ERROR: Syslog is enabled but ident was not set.\n");
352
+			fprintf(stderr, "ERROR: Ident is not set, please use --ident option.\n");
352 353
 		if (ca_err)
353 354
 			fprintf(stderr, "ERROR: Requested CA system is unsupported.\n");
354 355
 		if (server_err)

Loading…
Cancel
Save