vrahane commented on code in PR #3413:
URL: https://github.com/apache/mynewt-core/pull/3413#discussion_r2059357198


##########
sys/log/full/src/log_fcb.c:
##########
@@ -932,12 +933,21 @@ log_fcb_copy_entry(struct log *log, struct fcb_entry 
*entry,
         goto err;
     }
 
-    /* Changing the fcb to be logged to be dst fcb */
-    fcb_tmp = &((struct fcb_log *)log->l_arg)->fl_fcb;
+    /* Cache fcb_log pointer */
+    fcb_log_ptr = (struct fcb_log *)log->l_arg;
 
-    log->l_arg = dst_fcb;
+    /* Cache the fcb log, so that we preserve original fcb pointer and
+     * bookmark settings
+     */
+    memcpy(&fcb_log_tmp, log->l_arg, sizeof(struct fcb_log));
+    fcb_log_tmp.fl_fcb = *dst_fcb;

Review Comment:
   changed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to