Don't override error code set by timedif in vio init

This commit is contained in:
Klaas Freitag 2012-07-19 21:21:33 +02:00
parent 1104619a52
commit 85993d2650

View file

@ -327,7 +327,10 @@ retry_vio_init:
} else if (timediff < 0) {
/* error code was set in csync_timediff() */
CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL, "Synchronisation is not possible!");
ctx->error_code = CSYNC_ERR_TIMESKEW;
/* do not override error code set by timediff */
if(ctx->error_code == CSYNC_ERR_NONE) {
ctx->error_code = CSYNC_ERR_TIMESKEW;
}
rc = -1;
goto out;
}