Added log message when RETAIN memory not valid
authorEdouard Tisserant
Sat, 14 Mar 2015 14:51:39 +0100
changeset 1459 c9065fb5de0a
parent 1458 5c87045af670
child 1460 b7e610672eed
Added log message when RETAIN memory not valid
targets/plc_debug.c
--- a/targets/plc_debug.c	Sat Mar 14 11:32:23 2015 +0100
+++ b/targets/plc_debug.c	Sat Mar 14 14:51:39 2015 +0100
@@ -121,8 +121,12 @@
     buffer_state = BUFFER_FREE;
     InitRetain();
     /* Iterate over all variables to fill debug buffer */
-    if(CheckRetainBuffer())
+    if(CheckRetainBuffer()){
     	__for_each_variable_do(RemindIterator);
+    }else{
+    	char mstr[] = "RETAIN memory invalid - defaults used";
+        LogMessage(LOG_WARNING, mstr, sizeof(mstr));
+    }
     retain_offset = 0;
 }