Incorrect error handling corrected.

This commit is contained in:
Johan Wikman
2015-11-13 12:48:13 +02:00
parent 327c29849c
commit 841ec695e4

View File

@ -2651,13 +2651,16 @@ int mxs_log_flush_sync(void)
if (lm) if (lm)
{ {
flushall_logfiles(true); 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. // TODO: Add error handling to skygw_message_wait. Now void.
skygw_message_wait(lm->lm_clientmes); skygw_message_wait(lm->lm_clientmes);
} }
else
{
err = -1;
}
} }
return err; return err;