#941 Fix get computer center id

Creating a software profile failed. ogServer obtained the information of
a computer without center id because commit cbd9421 removed it
unintentionally, making all computer had center id equal to zero.

This commit restores the gathering of computer center id from the
database.
master
Javier Sánchez Parra 2020-10-27 14:03:14 +01:00 committed by OpenGnSys Support Team
parent b11608152e
commit 4f5c357dcd
1 changed files with 1 additions and 0 deletions

View File

@ -103,6 +103,7 @@ int og_dbi_get_computer_info(struct og_dbi *dbi, struct og_computer *computer,
snprintf(computer->mac, sizeof(computer->mac), "%s", snprintf(computer->mac, sizeof(computer->mac), "%s",
dbi_result_get_string(result, "mac")); dbi_result_get_string(result, "mac"));
computer->room = dbi_result_get_uint(result, "idaula"); computer->room = dbi_result_get_uint(result, "idaula");
computer->center = dbi_result_get_uint(result, "idcentro");
computer->hardware_id = dbi_result_get_uint(result, "idperfilhard"); computer->hardware_id = dbi_result_get_uint(result, "idperfilhard");
computer->repo_id = dbi_result_get_uint(result, "idrepositorio"); computer->repo_id = dbi_result_get_uint(result, "idrepositorio");
snprintf(computer->netmask, sizeof(computer->netmask), "%s", snprintf(computer->netmask, sizeof(computer->netmask), "%s",