mirror of https://git.48k.eu/ogserver
#738: integrar cambios del ticket:738 en versión 1.1
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4819 a21b9725-9963-47de-94b9-378ad31fedc9master
parent
c4b75b1a63
commit
d56675d9c8
|
@ -816,12 +816,6 @@ BOOLEAN actualizaConfiguracion(Database db, Table tbl, char* cfg, int ido)
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
if (atoi(tam) == dato) {// Parámetro tamaño igual al almacenado
|
if (atoi(tam) == dato) {// Parámetro tamaño igual al almacenado
|
||||||
if (!tbl.Get("uso", dato)) { // Toma dato
|
|
||||||
tbl.GetErrorErrStr(msglog); // Error al acceder al registro
|
|
||||||
errorInfo(modulo, msglog);
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
if (atoi(uso) == dato) {// Parámetro uso igual al almacenado
|
|
||||||
if (!tbl.Get("idsistemafichero", dato)) { // Toma dato
|
if (!tbl.Get("idsistemafichero", dato)) { // Toma dato
|
||||||
tbl.GetErrorErrStr(msglog); // Error al acceder al registro
|
tbl.GetErrorErrStr(msglog); // Error al acceder al registro
|
||||||
errorInfo(modulo, msglog);
|
errorInfo(modulo, msglog);
|
||||||
|
@ -839,7 +833,6 @@ BOOLEAN actualizaConfiguracion(Database db, Table tbl, char* cfg, int ido)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (swu) { // Hay que actualizar los parámetros de la partición
|
if (swu) { // Hay que actualizar los parámetros de la partición
|
||||||
sprintf(sqlstr, "UPDATE ordenadores_particiones SET "
|
sprintf(sqlstr, "UPDATE ordenadores_particiones SET "
|
||||||
" codpar=0x%s,"
|
" codpar=0x%s,"
|
||||||
|
@ -852,6 +845,12 @@ BOOLEAN actualizaConfiguracion(Database db, Table tbl, char* cfg, int ido)
|
||||||
" fechadespliegue=NULL"
|
" fechadespliegue=NULL"
|
||||||
" WHERE idordenador=%d AND numdisk=%s AND numpar=%s",
|
" WHERE idordenador=%d AND numdisk=%s AND numpar=%s",
|
||||||
cpt, tam, uso, idsfi, idsoi, ido, disk, par);
|
cpt, tam, uso, idsfi, idsoi, ido, disk, par);
|
||||||
|
} else { // Actualizar porcentaje de uso.
|
||||||
|
sprintf(sqlstr, "UPDATE ordenadores_particiones SET "
|
||||||
|
" uso=%s"
|
||||||
|
" WHERE idordenador=%d AND numdisk=%s AND numpar=%s",
|
||||||
|
uso, ido, disk, par);
|
||||||
|
}
|
||||||
if (!db.Execute(sqlstr, tbl)) { // Error al recuperar los datos
|
if (!db.Execute(sqlstr, tbl)) { // Error al recuperar los datos
|
||||||
errorLog(modulo, 21, FALSE);
|
errorLog(modulo, 21, FALSE);
|
||||||
db.GetErrorErrStr(msglog);
|
db.GetErrorErrStr(msglog);
|
||||||
|
@ -860,7 +859,6 @@ BOOLEAN actualizaConfiguracion(Database db, Table tbl, char* cfg, int ido)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
lon += sprintf(tbPar + lon, "(0,0)");
|
lon += sprintf(tbPar + lon, "(0,0)");
|
||||||
// Eliminar particiones almacenadas que ya no existen
|
// Eliminar particiones almacenadas que ya no existen
|
||||||
sprintf(sqlstr, "DELETE FROM ordenadores_particiones WHERE idordenador=%d AND (numdisk, numpar) NOT IN (%s)",
|
sprintf(sqlstr, "DELETE FROM ordenadores_particiones WHERE idordenador=%d AND (numdisk, numpar) NOT IN (%s)",
|
||||||
|
|
Loading…
Reference in New Issue