From: Florian Forster Date: Mon, 18 Jun 2012 08:49:38 +0000 (+0200) Subject: oracle plugin: Report the "connect id" when OCILogon() fails. X-Git-Tag: collectd-5.0.5~7^2~9 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=5957693cb9b458ba575eaf1c6c08f0053eb54ad9;p=collectd.git oracle plugin: Report the "connect id" when OCILogon() fails. --- diff --git a/src/oracle.c b/src/oracle.c index 4c85e293..79725d70 100644 --- a/src/oracle.c +++ b/src/oracle.c @@ -702,7 +702,11 @@ static int o_read_database (o_database_t *db) /* {{{ */ (OraText *) db->connect_id, (ub4) strlen (db->connect_id)); if ((status != OCI_SUCCESS) && (status != OCI_SUCCESS_WITH_INFO)) { - o_report_error ("o_read_database", "OCILogon", oci_error); + char errfunc[256]; + + ssnprintf (errfunc, sizeof (errfunc), "OCILogon(\"%s\")", db->connect_id); + + o_report_error ("o_read_database", errfunc, oci_error); DEBUG ("oracle plugin: OCILogon (%s): db->oci_service_context = %p;", db->connect_id, db->oci_service_context); db->oci_service_context = NULL;