implemented aes key validation
This commit is contained in:
@@ -42,8 +42,8 @@ void ClientCLI_destroy(ClientCLI* self){
|
||||
HashMap_destroy(&self->servers_addr_id_map);
|
||||
}
|
||||
void ClientCLI_construct(ClientCLI* self){
|
||||
self->client = NULL;
|
||||
self->db = NULL;
|
||||
memset(self, 0, sizeof(*self));
|
||||
pthread_mutex_init(&self->servers_cache_mutex, NULL);
|
||||
}
|
||||
|
||||
Result(void) ClientCLI_run(ClientCLI* self) {
|
||||
@@ -237,7 +237,8 @@ static Result(void) ClientCLI_selectServerFromCache(ClientCLI* self){
|
||||
|
||||
for(u32 id = 0; id < servers_count; id++){
|
||||
Server* row = &List_index(self->servers_cache_list, Server, id);
|
||||
printf("[%02u] "FMT_str"\n", id, row->name_len, row->name);
|
||||
printf("[%02u] "FMT_str" "FMT_str"\n",
|
||||
id, row->address_len, row->address, row->name_len, row->name);
|
||||
}
|
||||
|
||||
char buf[32];
|
||||
@@ -319,7 +320,6 @@ static Result(void) ClientCLI_openUserDB(ClientCLI* self){
|
||||
try(self->db, p, idb_open(user_db_dir, user_data_key));
|
||||
|
||||
// load servers table
|
||||
pthread_mutex_init(&self->servers_cache_mutex, NULL);
|
||||
try(self->db_servers_table, p, idb_getOrCreateTable(self->db, STR("servers"), sizeof(Server)));
|
||||
// load whole table to list
|
||||
try(u64 servers_count, u, idb_getRowCount(self->db_servers_table));
|
||||
|
||||
Reference in New Issue
Block a user