[asterisk-commits] manager.c: Fix lseek() parameter order. (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 21 18:42:20 CST 2018


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

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 177959a..b698702 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -7672,7 +7672,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");
@@ -8174,7 +8174,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/8365
To unsubscribe, visit https://gerrit.asterisk.org/settings

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


More information about the asterisk-commits mailing list