diff options
author | ramon <ramongomez@us.es> | 2014-05-21 11:49:51 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2014-05-21 11:49:51 +0000 |
commit | 80d1dfddf0b4139cd9d7c322fe4d4ac6c6895b29 (patch) | |
tree | 623855b58cab87ada7730c90ae9d7c585fd57764 /sources | |
parent | 3ff19086c315b34ca7a1512336429acc1a43ab94 (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 'sources')
-rw-r--r-- | sources/ogAdmServer.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index c7dc4f4..929a526 100644 --- a/sources/ogAdmServer.cpp +++ b/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); |