#971 check for NULL serial number

ogclient might return an empty serial number.
master
OpenGnSys Support Team 2021-03-19 14:48:27 +01:00
parent e6c2c26f09
commit f844a1b6bc
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ bool actualizaConfiguracion(struct og_dbi *dbi, char *cfg, int ido)
if (i == 0 && c == 1) {
splitCadena(ptrDual, ptrCfg[0], '=');
ser = ptrDual[1];
if (strlen(ser) > 0) {
if (ser && strlen(ser) > 0) {
// Solo actualizar si número de serie no existía.
result = dbi_conn_queryf(dbi->conn,
"UPDATE ordenadores SET numserie='%s'"