[icinga-checkins] icinga.org: icinga-core/master: fix postgres wrong type in service_object_id

git at icinga.org git at icinga.org
Wed Apr 21 22:40:31 CEST 2010


Module: icinga-core
Branch: master
Commit: 32bd11ed15070a9ee2930de4d23c680ce4d28e0d
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=32bd11ed15070a9ee2930de4d23c680ce4d28e0d

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Wed Apr 21 22:39:32 2010 +0200

fix postgres wrong type in service_object_id

---

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

diff --git a/Changelog b/Changelog
index 308ae17..8483920 100644
--- a/Changelog
+++ b/Changelog
@@ -19,6 +19,7 @@ FIXES
 
 * idoutils: Host DB inserts use string 'NULL\n' instead of NULL (William Preston)
 * idoutils: ndo2db_get_object_id fails to return existing IDs (William Preston)
+* idoutils: fix postgres wrong type in service_object_id
 
 
 1.0.1 - 03/03/2010
diff --git a/module/idoutils/src/dbqueries.c b/module/idoutils/src/dbqueries.c
index 0fa8e8e..b08cbf5 100644
--- a/module/idoutils/src/dbqueries.c
+++ b/module/idoutils/src/dbqueries.c
@@ -341,7 +341,7 @@ int ido2db_query_insert_or_update_timedevents_execute_add(ndo2db_idi *idi, void
                         asprintf(&query1, "UPDATE %s SET event_time=%s, event_time_usec=%lu, recurring_event=%d WHERE instance_id=%lu AND event_type=%d AND scheduled_time=%s AND object_id=%lu",
                                         ndo2db_db_tablenames[NDO2DB_DBTABLE_TIMEDEVENTS],
                                         *(char **) data[2],             /* update start */
-                                        *(unsigned *) data[3],
+                                        *(unsigned long *) data[3],
                                         *(int *) data[5],               /* update end */
                                         *(unsigned long *) data[0],     /* unique constraint start */
                                         *(int *) data[1],
@@ -1329,7 +1329,7 @@ int ido2db_query_insert_or_update_servicecheckdata_add(ndo2db_idi *idi, void **d
                                         *(char **) data[17],
                                         *(char **) data[18],            /* updapte end */
                                         *(unsigned long *) data[0],     /* unique constraint start */
-                                        *(unsigned *) data[1],
+                                        *(unsigned long *) data[1],
                                         *(char **) data[7],
                                         *(unsigned long *) data[8]      /* unique constraint end */
                         );





More information about the icinga-checkins mailing list