fjpanag commented on a change in pull request #3050: URL: https://github.com/apache/incubator-nuttx/pull/3050#discussion_r599576900
########## File path: drivers/syslog/syslog_write.c ########## @@ -56,37 +56,44 @@ static ssize_t syslog_default_write(FAR const char *buffer, size_t buflen) { - size_t nwritten; + int i; + size_t nwritten = 0; - if (up_interrupt_context() || sched_idletask()) + for (i = 0; i < CONFIG_SYSLOG_MAX_CHANNELS; i++) { - for (nwritten = 0; nwritten < buflen; nwritten++) + if (g_syslog_channel[i] == NULL) + break; + + if (up_interrupt_context() || sched_idletask()) { -#ifdef CONFIG_SYSLOG_INTBUFFER - if (up_interrupt_context()) + for (nwritten = 0; nwritten < buflen; nwritten++) { - syslog_add_intbuffer(*buffer++); - } - else +#ifdef CONFIG_SYSLOG_INTBUFFER + if (up_interrupt_context()) + { + syslog_add_intbuffer(*buffer++); Review comment: fixed -- 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: us...@infra.apache.org