mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 08:40:16 +00:00
Fix verboser issue over network (#2217)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
13
asterisk.c
13
asterisk.c
@@ -233,7 +233,18 @@ void ast_console_puts(const char *string)
|
|||||||
static void network_verboser(const char *s, int pos, int replace, int complete)
|
static void network_verboser(const char *s, int pos, int replace, int complete)
|
||||||
/* ARGUSED */
|
/* ARGUSED */
|
||||||
{
|
{
|
||||||
ast_network_puts(s);
|
if (replace) {
|
||||||
|
char *t = alloca(strlen(s) + 2);
|
||||||
|
if (t) {
|
||||||
|
sprintf(t, "\r%s", s);
|
||||||
|
ast_network_puts(t);
|
||||||
|
} else {
|
||||||
|
ast_log(LOG_ERROR, "Out of memory\n");
|
||||||
|
ast_network_puts(s);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ast_network_puts(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static pthread_t lthread;
|
static pthread_t lthread;
|
||||||
|
|||||||
Reference in New Issue
Block a user