From 841ec695e440ce864ca2377676aee4281f38c135 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Fri, 13 Nov 2015 12:48:13 +0200 Subject: [PATCH] Incorrect error handling corrected. --- log_manager/log_manager.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/log_manager/log_manager.cc b/log_manager/log_manager.cc index f81f9ef79..a3584c072 100644 --- a/log_manager/log_manager.cc +++ b/log_manager/log_manager.cc @@ -2651,13 +2651,16 @@ int mxs_log_flush_sync(void) if (lm) { flushall_logfiles(true); - err = skygw_message_send(lm->lm_logmes); - if (!err) + if (skygw_message_send(lm->lm_logmes) == MES_RC_SUCCESS) { // TODO: Add error handling to skygw_message_wait. Now void. skygw_message_wait(lm->lm_clientmes); } + else + { + err = -1; + } } return err;