summaryrefslogtreecommitdiffstats
path: root/cpukit/mghttpd/mongoose.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-03 14:54:05 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-06-06 12:57:07 +0200
commit214156d98c3421a84fe8ad27ba8891651eea7291 (patch)
tree90c1e146f07c5719d4079d6ff1e4eba25bad5cd9 /cpukit/mghttpd/mongoose.c
parentrtems: Fix no protocol mutex release (diff)
downloadrtems-214156d98c3421a84fe8ad27ba8891651eea7291.tar.bz2
mghttpd: Add RTEMS printer support
Diffstat (limited to 'cpukit/mghttpd/mongoose.c')
-rw-r--r--cpukit/mghttpd/mongoose.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/cpukit/mghttpd/mongoose.c b/cpukit/mghttpd/mongoose.c
index dd243d3320..a89fc56885 100644
--- a/cpukit/mghttpd/mongoose.c
+++ b/cpukit/mghttpd/mongoose.c
@@ -5519,3 +5519,15 @@ struct mg_context *mg_start(const struct mg_callbacks *callbacks,
return ctx;
}
+#ifdef __rtems__
+#include <rtems/print.h>
+
+static int mg_printer_plugin(void *context, const char *fmt, va_list ap) {
+ return mg_vprintf(context, fmt, ap);
+}
+
+void rtems_print_printer_mg_printf(rtems_printer *printer, struct mg_connection *conn) {
+ printer->context = conn;
+ printer->printer = mg_printer_plugin;
+}
+#endif /* __rtems__ */