Fixes #444
Signed-off-by: David Goulet <dgoulet@efficios.com>
int opt, ret = CMD_SUCCESS;
static poptContext pc;
char *session_name = NULL;
int opt, ret = CMD_SUCCESS;
static poptContext pc;
char *session_name = NULL;
pc = poptGetContext(NULL, argc, argv, long_options, 0);
poptReadDefaultConfig(pc, 0);
pc = poptGetContext(NULL, argc, argv, long_options, 0);
poptReadDefaultConfig(pc, 0);
ret = CMD_UNDEFINED;
goto end;
}
ret = CMD_UNDEFINED;
goto end;
}
+
+ /* Validate event type. Multiple event type are not supported. */
+ if (event_type == -1) {
+ event_type = opt_event_type;
+ } else {
+ if (event_type != opt_event_type) {
+ ERR("Multiple event type not supported.");
+ ret = CMD_ERROR;
+ goto end;
+ }
+ }
}
opt_event_list = (char*) poptGetArg(pc);
}
opt_event_list = (char*) poptGetArg(pc);