mirror of https://git.48k.eu/ogserver
dbi: og_computer_get_info() uses netmask field in 'room' table
netmask field in 'computers' table is never used, but ogcli still displays it through: # ogcli list client --client-ip 1.2.3.4 and it shows '0' or incorrect netmask (ogCP hardcodes this field). Update SQL query to fetch the room.netmask instead.master v1.2.5-4
parent
edac32bb98
commit
16d7a18441
|
@ -69,7 +69,6 @@ int og_dbi_get_computer_info(struct og_dbi *dbi, struct og_computer *computer,
|
|||
" ordenadores.idaula,"
|
||||
" ordenadores.idperfilhard,"
|
||||
" ordenadores.idrepositorio,"
|
||||
" ordenadores.mascara,"
|
||||
" ordenadores.arranque,"
|
||||
" ordenadores.netiface,"
|
||||
" ordenadores.netdriver,"
|
||||
|
@ -78,6 +77,7 @@ int og_dbi_get_computer_info(struct og_dbi *dbi, struct og_computer *computer,
|
|||
" ordenadores.inremotepc,"
|
||||
" ordenadores.maintenance,"
|
||||
" ordenadores.identorno,"
|
||||
" aulas.netmask,"
|
||||
" centros.idcentro "
|
||||
"FROM ordenadores "
|
||||
"INNER JOIN aulas ON aulas.idaula=ordenadores.idaula "
|
||||
|
@ -111,7 +111,7 @@ int og_dbi_get_computer_info(struct og_dbi *dbi, struct og_computer *computer,
|
|||
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",
|
||||
dbi_result_get_string(result, "mascara"));
|
||||
dbi_result_get_string(result, "netmask"));
|
||||
snprintf(computer->boot, sizeof(computer->boot), "%s",
|
||||
dbi_result_get_string(result, "arranque"));
|
||||
snprintf(computer->netiface, sizeof(computer->netiface), "%s",
|
||||
|
|
Loading…
Reference in New Issue