From cc50b6824e21d9ebb3491bbd4c6d7d8f09be9657 Mon Sep 17 00:00:00 2001 From: Luis Fernando Munoz Mejias Date: Thu, 12 Nov 2009 14:34:55 +0100 Subject: If the server disconnects the handle is no longer valid and we need to call tryResume(), so we have to return RS_RET_SUSPENDED. Otherwise, we may keep losing messages until rsyslog is restarted. --- plugins/omoracle/omoracle.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/omoracle/omoracle.c') diff --git a/plugins/omoracle/omoracle.c b/plugins/omoracle/omoracle.c index 331b7dd4..ee0c226a 100644 --- a/plugins/omoracle/omoracle.c +++ b/plugins/omoracle/omoracle.c @@ -180,6 +180,9 @@ static int oci_errors(void* handle, ub4 htype, sword status) break; case OCI_INVALID_HANDLE: errmsg.LogError(0, NO_ERRCODE, "OCI INVALID HANDLE\n"); + /* In this case we may have to trigger a call to + * tryResume(). */ + return RS_RET_SUSPENDED; break; case OCI_STILL_EXECUTING: errmsg.LogError(0, NO_ERRCODE, "Still executing...\n"); -- cgit v1.2.3