From: Richard Mudgett Date: Wed, 21 Feb 2018 18:52:39 +0000 (-0600) Subject: manager.c: Fix lseek() parameter order. X-Git-Tag: 15.3.0-rc1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0571da99320fc36a977a2446764a8a28c1c9d04a;p=thirdparty%2Fasterisk.git manager.c: Fix lseek() parameter order. ASTERISK-27659 Change-Id: I04a2705d2cb7df250769967bc59e2b397a49b797 --- diff --git a/main/manager.c b/main/manager.c index 078993f359..31465f6b48 100644 --- a/main/manager.c +++ b/main/manager.c @@ -7665,7 +7665,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"); @@ -8167,7 +8167,7 @@ static int auth_http_callback(struct ast_tcptls_session_instance *ser, m.headers[idx] = NULL; } - result_size = lseek(ast_iostream_get_fd(s.stream), SEEK_CUR, 0); /* Calculate approx. size of result */ + result_size = lseek(ast_iostream_get_fd(s.stream), 0, SEEK_CUR); /* Calculate approx. size of result */ http_header = ast_str_create(80); out = ast_str_create(result_size * 2 + 512);