From f2ca9eeb217e47fcb4848c4252762bc8af5162d1 Mon Sep 17 00:00:00 2001 From: Ferdi Franceschini Date: Fri, 25 Aug 2006 12:17:32 +1000 Subject: [PATCH] Keep the last error message. r1076 | ffr | 2006-08-25 12:17:32 +1000 (Fri, 25 Aug 2006) | 2 lines --- site_ansto/motor_dmc2280.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/site_ansto/motor_dmc2280.c b/site_ansto/motor_dmc2280.c index 3e8d5a68..7f7a4dd5 100644 --- a/site_ansto/motor_dmc2280.c +++ b/site_ansto/motor_dmc2280.c @@ -577,7 +577,6 @@ static void DMC2280Error(void *pData, int *iCode, char *error, int errLen){ return; } } - error = self->errorMsg; *iCode = self->errorCode; switch(*iCode){ case NOTCONNECTED: @@ -634,7 +633,7 @@ static void DMC2280Error(void *pData, int *iCode, char *error, int errLen){ /* FIXME What's the default */ break; } - self->errorCode = 0; + strncpy(self->errorMsg,error,(size_t)errLen); } /** \brief Attempts to recover from an error. Implements the TryAndFixIt