BT_CLI_LOGE_APPEND_CAUSE("Missing `timer-us` entry.");
goto error;
}
- timer_us = bt_value_integer_signed_get(v);
+ timer_us = bt_value_integer_unsigned_get(v);
fprintf(out_stream, " (timer = %" PRIu64 ", ", timer_us);
v = bt_value_map_borrow_entry_value_const(map, "stream-count");
if (!v) {
"Missing `stream-count` entry.");
goto error;
}
- streams = bt_value_integer_signed_get(v);
+ streams = bt_value_integer_unsigned_get(v);
fprintf(out_stream, "%" PRIu64 " stream(s), ", streams);
v = bt_value_map_borrow_entry_value_const(map, "client-count");
if (!v) {
"Missing `client-count` entry.");
goto error;
}
- clients = bt_value_integer_signed_get(v);
+ clients = bt_value_integer_unsigned_get(v);
fprintf(out_stream, "%" PRIu64 " client(s) connected)\n", clients);
}
{
int ret;
int retcode;
- struct bt_config *cfg;
+ struct bt_config *cfg = NULL;
init_log_level();
set_signal_handler();
init_loaded_plugins();
- cfg = bt_config_cli_args_create_with_default(argc, argv, &retcode);
+
+ BT_ASSERT(!the_interrupter);
+ the_interrupter = bt_interrupter_create();
+ if (!the_interrupter) {
+ BT_CLI_LOGE_APPEND_CAUSE("Failed to create an interrupter object.");
+ retcode = 1;
+ goto end;
+ }
+
+ cfg = bt_config_cli_args_create_with_default(argc, argv, &retcode,
+ the_interrupter);
if (retcode < 0) {
/* Quit without errors; typically usage/version */
}
}
- BT_ASSERT(!the_interrupter);
- the_interrupter = bt_interrupter_create();
- if (!the_interrupter) {
- BT_CLI_LOGE_APPEND_CAUSE("Failed to create an interrupter object.");
- retcode = 1;
- goto end;
- }
-
BT_LOGI("Executing command: cmd=%d, command-name=\"%s\"",
cfg->command, cfg->command_name);