From e1ca94122f8a71f9cb9058ffd15fa632479d4e6a Mon Sep 17 00:00:00 2001 From: alonso Date: Mon, 18 Feb 2013 13:01:23 +0000 Subject: git-svn-id: https://opengnsys.es/svn/branches/version1.0@3611 a21b9725-9963-47de-94b9-378ad31fedc9 --- sources/ogAdmServer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index 808c85c..cbd0d71 100644 --- a/sources/ogAdmServer.cpp +++ b/sources/ogAdmServer.cpp @@ -736,6 +736,7 @@ BOOLEAN actualizaConfiguracion(Database db, Table tbl, char* cfg, int ido) char *disk, *par, *cpt, *sfi, *soi, *tam; // Parametros que definen una particiĆ³n char modulo[] = "actualizaConfiguracion()"; + lon = sprintf(tbPar, "("); p = splitCadena(ptrPar, cfg, '\n'); for (i = 0; i < p; i++) { @@ -776,6 +777,8 @@ BOOLEAN actualizaConfiguracion(Database db, Table tbl, char* cfg, int ido) sprintf(sqlstr, "SELECT numdisk,numpar,codpar,tamano,idsistemafichero,idnombreso" " FROM ordenadores_particiones WHERE idordenador=%d AND numdisk=%s AND numpar=%s", ido, disk, par); + + if (!db.Execute(sqlstr, tbl)) { // Error al recuperar los datos errorLog(modulo, 21, FALSE); db.GetErrorErrStr(msglog); @@ -786,6 +789,8 @@ BOOLEAN actualizaConfiguracion(Database db, Table tbl, char* cfg, int ido) sprintf(sqlstr, "INSERT INTO ordenadores_particiones(idordenador,numdisk,numpar,codpar,tamano,idsistemafichero,idnombreso,idimagen)" " VALUES(%d,%s,%s,0x%s,%s,%d,%d,0)", ido, disk, par, cpt, tam, idsfi, idsoi); + + if (!db.Execute(sqlstr, tbl)) { // Error al insertar db.GetErrorErrStr(msglog); errorInfo(modulo, msglog); -- cgit v1.2.3-18-g5258