You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by vi...@apache.org on 2019/11/26 00:17:25 UTC

[mynewt-mcumgr] branch master updated: log_mgmt: Set watermark on filling up log rsp

This is an automated email from the ASF dual-hosted git repository.

vipulrahane pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-mcumgr.git


The following commit(s) were added to refs/heads/master by this push:
     new 4cec1ff  log_mgmt: Set watermark on filling up log rsp
     new cbbbb45  Merge pull request #50 from vrahane/log_mgmt_watermark_fix
4cec1ff is described below

commit 4cec1ff115519c38437884018ee72e517c801a89
Author: Vipul Rahane <vr...@gmail.com>
AuthorDate: Mon Nov 25 15:59:49 2019 -0800

    log_mgmt: Set watermark on filling up log rsp
    
    - After filling up log responses, set the watermark as well. We have to
    honor LOG_MGMT_ERR_UNKNOWN.
---
 cmd/log_mgmt/src/log_mgmt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmd/log_mgmt/src/log_mgmt.c b/cmd/log_mgmt/src/log_mgmt.c
index 0686c37..42343a5 100644
--- a/cmd/log_mgmt/src/log_mgmt.c
+++ b/cmd/log_mgmt/src/log_mgmt.c
@@ -313,12 +313,12 @@ log_encode_entries(const struct log_mgmt_log *log, CborEncoder *enc,
         return LOG_MGMT_ERR_ENOMEM;
     }
 
+err:
 #if LOG_MGMT_READ_WATERMARK_UPDATE
-    if (!rc) {
+    if (!rc || rc == LOG_MGMT_ERR_EUNKNOWN) {
         log_mgmt_impl_set_watermark(log, ctxt.last_enc_index);
     }
 #endif
-err:
     return rc;
 }