Bug # 1973: Change write to ast_carefulwrite
authorMalcolm Davenport <malcolmd@digium.com>
Thu, 8 Jul 2004 19:41:34 +0000 (19:41 +0000)
committerMalcolm Davenport <malcolmd@digium.com>
Thu, 8 Jul 2004 19:41:34 +0000 (19:41 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3403 65c4cc65-6c06-0410-ace0-fbb531ad65f3

cli.c

diff --git a/cli.c b/cli.c
index 1376ed2..6c03fbd 100755 (executable)
--- a/cli.c
+++ b/cli.c
@@ -19,6 +19,7 @@
 #include <asterisk/module.h>
 #include <asterisk/channel.h>
 #include <asterisk/channel_pvt.h>
+#include <asterisk/manager.h>
 #include <asterisk/utils.h>
 #include <asterisk/lock.h>
 #include <sys/signal.h>
@@ -42,7 +43,7 @@ void ast_cli(int fd, char *fmt, ...)
        va_start(ap, fmt);
        vasprintf(&stuff, fmt, ap);
        va_end(ap);
-       write(fd, stuff, strlen(stuff));
+       ast_carefulwrite(fd, stuff, strlen(stuff), 100);
        free(stuff);
 }