[asterisk-bugs] [JIRA] (ASTERISK-27659) Output from rawman truncated if output is long enough

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Wed Feb 21 12:47:13 CST 2018


     [ https://issues.asterisk.org/jira/browse/ASTERISK-27659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Mudgett reassigned ASTERISK-27659:
------------------------------------------

    Assignee: Richard Mudgett

> Output from rawman truncated if output is long enough
> -----------------------------------------------------
>
>                 Key: ASTERISK-27659
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27659
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Core/ManagerInterface
>    Affects Versions: 15.2.0
>         Environment: Debian GNU/Linux 9 (Jessie)
>            Reporter: Bojan Nemčić
>            Assignee: Richard Mudgett
>            Severity: Minor
>
> Output from rawman is truncated if the output of the requested action is long enough (in my case >4100 bytes, but I cannot confirm if this is a constant on all systems).
> Seems to be caused by the wrong argument order passed to {{lseek}}, patch attached.
> {code}
> diff --git a/main/manager.c b/main/manager.c
> index 71d7432a0f..497e7e5f38 100644
> --- a/main/manager.c
> +++ b/main/manager.c
> @@ -7657,7 +7657,7 @@ static void process_output(struct mansession *s, struct ast_str **out, struct as
>  
>         fd = ast_iostream_get_fd(s->stream);
>  
> -       l = lseek(fd, SEEK_CUR, 0);
> +       l = lseek(fd, 0, SEEK_CUR);
>         if (l > 0) {
>                 if (MAP_FAILED == (buf = mmap(NULL, l, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0))) {
>                         ast_log(LOG_WARNING, "mmap failed.  Manager output was not processed\n");
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list