From e83ef509b3619d5bc68e8cf32ca264bd991d1679 Mon Sep 17 00:00:00 2001 From: mar Date: Fri, 1 Sep 1989 15:01:57 +0000 Subject: [PATCH] catch unexpected ingres errors in a more sensible manner --- server/qrtn.qc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/qrtn.qc b/server/qrtn.qc index a709f57a..013903f6 100644 --- a/server/qrtn.qc +++ b/server/qrtn.qc @@ -317,6 +317,12 @@ sms_process_query(cl, name, argc, argv_ro, action, actarg) } out: + if (status == SMS_SUCCESS && ingres_errno != 0) { + com_err(whoami, SMS_INTERNAL, "Server didn't notice INGRES ERROR %d", + ingres_errno); + status = sms_errcode; + } + if (q->type != RETRIEVE) { if (status == SMS_SUCCESS) { ## end transaction /* commit to this */ @@ -348,12 +354,6 @@ out: ## set lockmode session where readlock = system } - if (status == SMS_SUCCESS && ingres_errno != 0) { - critical_alert("SMS", "Server didn't notice INGRES ERROR %d", - ingres_errno); - status = SMS_INTERNAL; - } - if (status != SMS_SUCCESS && log_flags & LOG_RES) com_err(whoami, status, " (Query failed)"); return(status); -- 2.45.2