[Asterisk-code-review] Implement internal abstraction for iostreams (asterisk[master])

Timo Teräs asteriskteam at digium.com
Thu Aug 18 06:01:19 CDT 2016


Timo Teräs has posted comments on this change.

Change subject: Implement internal abstraction for iostreams
......................................................................


Patch Set 4:

(1 comment)

I can fix the memmove() issues. I am not too familiar with the test framework, but can take a look at it. Any suggestions for tests to add?

https://gerrit.asterisk.org/#/c/2932/4/main/iostream.c
File main/iostream.c:

Line 230: ssize_t ast_iostream_gets(struct ast_iostream *stream, char *buf, size_t count)
> Yes, don't add more accessors at this time. Only what is needed/used.
I should probably fix to not do memmove() here. Instead use head pointer. And memmove() the buffer only when it needs to be filled with some data in it already.

Likely the delmited string to be read is short compared to the buffer size (10-30 bytes vs. 4k buffer). So it's probably more worthwhile to read to the buffer.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id916aef418b665ced6a7489aef74908b6e376e85
Gerrit-PatchSet: 4
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Timo Teräs <timo.teras at iki.fi>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Timo Teräs <timo.teras at iki.fi>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list