+static uint8_t text_equals_log_end(char * log, char * text)
+{
+ uint16_t len_old = strlen(log);
+ uint16_t last_nl = len_old - 1;
+ while (last_nl != 0)
+ {
+ if ('\n' == log[last_nl])
+ {
+ break;
+ }
+ last_nl--;
+ }
+ uint16_t last_stop = len_old - 1;
+ while (last_stop != 0)
+ {
+ if ('.' == log[last_stop] && '.' != log[last_stop - 1])
+ {
+ break;
+ }
+ last_stop--;
+ }
+ if ( (last_stop + 1) - last_nl == (uint16_t) strlen(text)
+ && 0 == strncmp(log + last_nl, text, strlen(text)))
+ {
+ return 1;
+ }
+ return 0;
+}
+
+
+