summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2020-10-27 14:03:14 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-10-27 17:04:26 +0100
commit4f5c357dcd1a5531955cf8cd185fc86bbec66168 (patch)
treef3fd3f60704b497eb252c96211e1ff3cbb61123f
parentb11608152e9e2a9af32e15a100d3d034222ad3e4 (diff)
#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.
-rw-r--r--src/dbi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dbi.c b/src/dbi.c
index 33c4a8e..3f97fee 100644
--- a/src/dbi.c
+++ b/src/dbi.c
@@ -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",
dbi_result_get_string(result, "mac"));
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->repo_id = dbi_result_get_uint(result, "idrepositorio");
snprintf(computer->netmask, sizeof(computer->netmask), "%s",