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 <[email protected]>
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 <[email protected]>
    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 <[email protected]>
    
    Signed-off-by: Jiuzhu Dong <[email protected]>
---
 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;

Reply via email to