[icinga-checkins] icinga.org: icinga-core/test/ido: * idoutils: fix IDOUtils on PostgreSQL, recreates service objects in icinga_objects (thx Torsten Fohrer) #3166 - MF

git at icinga.org git at icinga.org
Wed Oct 3 01:18:35 CEST 2012


Module: icinga-core
Branch: test/ido
Commit: e4a0b7cf73bcfc532e9d2c5b7e87dc12133e91a8
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=e4a0b7cf73bcfc532e9d2c5b7e87dc12133e91a8

Author: Michael Friedrich <michael.friedrich at gmail.com>
Date:   Mon Sep 24 16:01:58 2012 +0200

* idoutils: fix IDOUtils on PostgreSQL, recreates service objects in icinga_objects (thx Torsten Fohrer) #3166 - MF

refs #3166

---

 Changelog                        |    1 +
 module/idoutils/src/dbhandlers.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Changelog b/Changelog
index 93ddfc9..93eff76 100644
--- a/Changelog
+++ b/Changelog
@@ -93,6 +93,7 @@ FIXES
 * idoutils: fix insert on duplicate key with multiple unique keys marked unsafe in mysql >= 5.5.24; rewrite all queries #3008 - MF
 * idoutils: fix redundant indexes in MySQL schema (thx Michael Renner) #3018 - MF
 * idoutils: re-add missing indexes from #1110 resolving performance issues on all supported rdbms #2618 - MF
+* idoutils: fix IDOUtils on PostgreSQL, recreates service objects in icinga_objects (thx Torsten Fohrer) #3166 - MF
 
 * install: fix icinga.xml for solaris pkg not updated #2609 - CF
 
diff --git a/module/idoutils/src/dbhandlers.c b/module/idoutils/src/dbhandlers.c
index feadc68..b2c53fb 100644
--- a/module/idoutils/src/dbhandlers.c
+++ b/module/idoutils/src/dbhandlers.c
@@ -144,7 +144,7 @@ int ido2db_get_object_id(ido2db_idi *idi, int object_type, char *n1, char *n2, u
 			break;
                 case IDO2DB_DBSERVER_PGSQL:
                         /* Postgres does case sensitive compare  */
-                        if (asprintf(&buf2, "name2=E'%s'", es[0]) == -1)
+                        if (asprintf(&buf2, "name2=E'%s'", es[1]) == -1)
                                 buf2 = NULL;
                         break;
 		default:





More information about the icinga-checkins mailing list