From: Florian Forster Date: Fri, 18 Dec 2009 10:26:20 +0000 (+0100) Subject: Merge branch 'collectd-4.8' into collectd-4.9 X-Git-Tag: collectd-4.9.0~1 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=557b23d4bc8eb6ca64eab72b2d768112486f5001;hp=5ad3a491af300d7336112607e20b0364d1f3f2bb;p=collectd.git Merge branch 'collectd-4.8' into collectd-4.9 Conflicts: ChangeLog --- diff --git a/ChangeLog b/ChangeLog index 5c3542be..6275837b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -37,6 +37,25 @@ * scale target: This target to scale (multiply) values by an arbitrary value has been added. +2009-12-18, Version 4.8.2 + * Build system, java plugin: Don't use “find -L” to search for Java + headers, because it's a GNU extension. + * Build system: Support for parallel builds has been improved. Thanks + Sebastian Harl and Stefan Völkel for looking into this. + * collectd: Print error messages to STDERR if no log plugin has been + loaded. + * genericjmx plugin: Close and re-open the connection upon I/O-errors. + * gmond plugin: Fix typos which caused syntax errors. + * memory plugin: Handling of >4 Gbyte of memory has been fixed. + * network plugin: The license has been changed to LGPL 2.1. + * oracle plugin: Reconnect to the database if the connection dies. + * rrdcached plugin: Work-around for a bug in RRDtool 1.4rc2 has been + added. + * snmp plugin: Handling of negative values has been fixed. Strings + containing control characters are now interpreted as hex-strings. + * unixsock plugin: A memory leak in the LISTVAL command has been + fixed. Thanks to Ben Knight for his patch. + 2009-10-04, Version 4.8.1 * Build system: Issues when building the iptables plugin have been fixed. @@ -97,6 +116,23 @@ lists, where at least one data source is of type COUNTER and the counter value of all counter data sources is zero. +2009-12-18, Version 4.7.5 + * Build system, java plugin: Don't use “find -L” to search for Java + headers, because it's a GNU extension. + * Build system: Support for parallel builds has been improved. Thanks + Sebastian Harl and Stefan Völkel for looking into this. + * collectd: Print error messages to STDERR if no log plugin has been + loaded. + * memory plugin: Handling of >4 Gbyte of memory has been fixed. + * network plugin: The license has been changed to LGPL 2.1. + * oracle plugin: Reconnect to the database if the connection dies. + * rrdcached plugin: Work-around for a bug in RRDtool 1.4rc2 has been + added. + * snmp plugin: Handling of negative values has been fixed. Strings + containing control characters are now interpreted as hex-strings. + * unixsock plugin: A memory leak in the LISTVAL command has been + fixed. Thanks to Ben Knight for his patch. + 2009-10-03, Version 4.7.4 * Build system: Issues when building the iptables plugin have been fixed. diff --git a/src/network.c b/src/network.c index 1b453753..86157538 100644 --- a/src/network.c +++ b/src/network.c @@ -4,17 +4,18 @@ * Copyright (C) 2009 Aman Gupta * * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; only version 2 of the License is applicable. + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; only version 2.1 of the License is + * applicable. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * Authors: * Florian octo Forster diff --git a/src/oracle.c b/src/oracle.c index 78a09ffd..49cf6571 100644 --- a/src/oracle.c +++ b/src/oracle.c @@ -598,6 +598,41 @@ static int o_read_database (o_database_t *db) /* {{{ */ size_t i; int status; + if (db->oci_service_context != NULL) + { + OCIServer *server_handle; + ub4 connection_status; + + server_handle = NULL; + status = OCIAttrGet ((void *) db->oci_service_context, OCI_HTYPE_SVCCTX, + (void *) &server_handle, /* size pointer = */ NULL, + OCI_ATTR_SERVER, oci_error); + if (status != OCI_SUCCESS) + { + o_report_error ("o_read_database", "OCIAttrGet", oci_error); + return (-1); + } + assert (server_handle != NULL); + + connection_status = 0; + status = OCIAttrGet ((void *) server_handle, OCI_HTYPE_SERVER, + (void *) &connection_status, /* size pointer = */ NULL, + OCI_ATTR_SERVER_STATUS, oci_error); + if (status != OCI_SUCCESS) + { + o_report_error ("o_read_database", "OCIAttrGet", oci_error); + return (-1); + } + + if (connection_status != OCI_SERVER_NORMAL) + { + INFO ("oracle plugin: Connection to %s lost. Trying to reconnect.", + db->name); + OCIHandleFree (db->oci_service_context, OCI_HTYPE_SVCCTX); + db->oci_service_context = NULL; + } + } /* if (db->oci_service_context != NULL) */ + if (db->oci_service_context == NULL) { status = OCILogon (oci_env, oci_error, diff --git a/version-gen.sh b/version-gen.sh index a36d6f5e..bd87bbb5 100755 --- a/version-gen.sh +++ b/version-gen.sh @@ -1,6 +1,6 @@ #!/bin/sh -DEFAULT_VERSION="4.8.1.git" +DEFAULT_VERSION="4.8.2.git" VERSION="`git describe 2> /dev/null | sed -e 's/^collectd-//'`"