summaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2014-05-21 11:49:51 +0000
committerramon <ramongomez@us.es>2014-05-21 11:49:51 +0000
commit5a0e8ec7cb4d70fb3da43b5de9f5ee2c0f74b698 (patch)
tree9ae95dd7d96057b237f5d01456804c35d6be0300 /admin
parent886a82474576d7abad90d616423c8a4167ae68db (diff)
#616: Obtener el repositorio asignado al PC modelo al crear imagen en una 2ยช unidad organizativa con varias repositorios.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4270 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin')
-rw-r--r--admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp
index c7dc4f41..929a5264 100644
--- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp
+++ b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp
@@ -1991,8 +1991,11 @@ BOOLEAN actualizaCreacionImagen(Database db, Table tbl, char* idi, char* par,
char modulo[] = "actualizaCreacionImagen()";
int idr,ifs;
- /* Toma identificador del repositorio */
- sprintf(sqlstr, "SELECT idrepositorio FROM repositorios WHERE ip='%s'", ipr);
+ /* Toma identificador del repositorio correspondiente al ordenador modelo */
+ sprintf(sqlstr, "SELECT repositorios.idrepositorio"
+ " FROM repositorios"
+ " LEFT JOIN ordenadores USING (idrepositorio)"
+ " WHERE repositorios.ip='%s' AND ordenadores.idordenador=%s", ipr, ido);
if (!db.Execute(sqlstr, tbl)) { // Error al leer
errorLog(modulo, 21, FALSE);