You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/10/23 22:47:57 UTC

[GitHub] [mynewt-mcumgr] vrahane commented on a change in pull request #41: log_mgmt:fix watermark not getting set for req log

vrahane commented on a change in pull request #41: log_mgmt:fix watermark not getting set for req log
URL: https://github.com/apache/mynewt-mcumgr/pull/41#discussion_r338313655
 
 

 ##########
 File path: cmd/log_mgmt/port/mynewt/src/mynewt_log_mgmt.c
 ##########
 @@ -52,17 +52,13 @@ log_mgmt_impl_set_watermark(struct log_mgmt_log *log, int index)
 {
 #if MYNEWT_VAL(LOG_STORAGE_WATERMARK)
     struct log *tmplog;
-    int i;
 
-    tmplog = NULL;
-    for (i = 0; i <= index; i++) {
-        tmplog = log_list_get_next(tmplog);
-        if (tmplog == NULL) {
-            return LOG_MGMT_ERR_ENOENT;
-        }
+    tmplog = mynewt_log_mgmt_find_log(log->name);
+    if (tmplog) {
+        return log_set_watermark(tmplog, index);
 
 Review comment:
   added a mapping function, thanks 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services