[Asterisk-code-review] manager.c: Fix lseek() parameter order. (asterisk[15])

Jenkins2 asteriskteam at digium.com
Wed Feb 21 17:29:20 CST 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/8364 )

Change subject: manager.c: Fix lseek() parameter order.
......................................................................

manager.c: Fix lseek() parameter order.

ASTERISK-27659

Change-Id: I04a2705d2cb7df250769967bc59e2b397a49b797
---
M main/manager.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Corey Farrell: Looks good to me, but someone else must approve
  Sean Bright: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/main/manager.c b/main/manager.c
index 078993f..31465f6 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -7665,7 +7665,7 @@
 
 	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 @@
 		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);

-- 
To view, visit https://gerrit.asterisk.org/8364
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I04a2705d2cb7df250769967bc59e2b397a49b797
Gerrit-Change-Number: 8364
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180221/b9c60e58/attachment.html>


More information about the asterisk-code-review mailing list