summaryrefslogtreecommitdiff
path: root/nest/cmds.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-10-05 20:12:28 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2013-10-05 20:12:28 +0200
commit0e175f9f0fd872e95225355dbdeca49cd35ec0fd (patch)
treee54284ea9541f3de0600acab2c8d76681f4f0ddc /nest/cmds.c
parent6a8d3f1c1ffbd964e4d11b452c73e1ea70310af3 (diff)
Fixes some BFD bugs and makes logging thread-safe.
Diffstat (limited to 'nest/cmds.c')
-rw-r--r--nest/cmds.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/nest/cmds.c b/nest/cmds.c
index 9bdd66cd..ec6bc762 100644
--- a/nest/cmds.c
+++ b/nest/cmds.c
@@ -92,13 +92,10 @@ cmd_show_memory(void)
cli_msg(0, "");
}
-extern const char *log_buffer_ptr;
-
void
cmd_eval(struct f_inst *expr)
{
struct f_val v = f_eval(expr, this_cli->parser_pool);
- log_reset();
if (v.type == T_RETURN)
{
@@ -106,7 +103,8 @@ cmd_eval(struct f_inst *expr)
return;
}
- val_print(v);
- cli_msg(23, "%s", log_buffer_ptr);
- log_reset();
+ buffer buf;
+ LOG_BUFFER_INIT(buf);
+ val_format(v, &buf);
+ cli_msg(23, "%s", buf.start);
}