You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gu...@apache.org on 2021/06/02 13:25:35 UTC

[incubator-nuttx] branch master updated: syslog/emerg: fix bug about printing LOG_EMERG log from iob buffer

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

gustavonihei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new e21fddb  syslog/emerg: fix bug about printing LOG_EMERG log from iob buffer
e21fddb is described below

commit e21fddbb34b20e1e804bb694537a40b90da7044c
Author: Jiuzhu Dong <do...@xiaomi.com>
AuthorDate: Wed Jun 2 10:25:18 2021 +0800

    syslog/emerg: fix bug about printing LOG_EMERG log from iob buffer
    
    The patch is related to: commit 5f7c98b6e1b6da9f4765572a63ac678d407c8095
    
    Author: Xiang Xiao <xi...@xiaomi.com>
    Date:   Mon May 17 22:38:22 2021 +0800
    
        drivers/syslog: Remove emergstream implementation and caller
    
        since emergstream always call syslog_force, but syslog_force is designed
        for the interrupt context, and then doesn't mean any emergency thing.
        On the other hand, emergstream has other bad side effect:
        1.Can't output to file or dev channel
        2.Can't work well with the interrupt buffer
    
        Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
    
    Signed-off-by: Jiuzhu Dong <do...@xiaomi.com>
---
 drivers/syslog/vsyslog.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/syslog/vsyslog.c b/drivers/syslog/vsyslog.c
index 65243d4..063f154 100644
--- a/drivers/syslog/vsyslog.c
+++ b/drivers/syslog/vsyslog.c
@@ -223,10 +223,7 @@ int nx_vsyslog(int priority, FAR const IPTR char *fmt, FAR va_list *ap)
 #ifdef CONFIG_SYSLOG_BUFFER
   /* Flush and destroy the syslog stream buffer */
 
-  if (priority != LOG_EMERG)
-    {
-      syslogstream_destroy(&stream);
-    }
+  syslogstream_destroy(&stream);
 #endif
 
   return ret;