ob_dup() did not preserve source position #66

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@rom1v
Contributor

rom1v commented Jul 5, 2013

ob_append_bytes() changes the position, so it must be reset.

ob_dup() did not preserve source position
ob_append_bytes() changes the position, so it must be reset.
@rom1v

This comment has been minimized.

Show comment
Hide comment
@rom1v

rom1v Jul 5, 2013

Contributor

Arf, it breaks tests/routing

I think there is a problem: shouldn't ob_dup() preserve position on the destination buffer?

Contributor

rom1v commented Jul 5, 2013

Arf, it breaks tests/routing

I think there is a problem: shouldn't ob_dup() preserve position on the destination buffer?

@lakeman

This comment has been minimized.

Show comment
Hide comment
@lakeman

lakeman Jul 5, 2013

Member

Yeah, that set of functions don't quite behave like you might expect them
to, and the rest of the application depends on that behaviour.

I'd actually like to implement a reference counted replacement that would
allow us to use scatter gather I/O for relaying packets directly from the
buffer we received them in without any memory copying.

On Fri, Jul 5, 2013 at 7:41 PM, ®om notifications@github.com wrote:

Arf, it breaks tests/routing…

I think there is a problem: shouldn't ob_dup() preserve position on the
destination buffer?


Reply to this email directly or view it on GitHubhttps://github.com/servalproject/serval-dna/pull/66#issuecomment-20510566
.

Member

lakeman commented Jul 5, 2013

Yeah, that set of functions don't quite behave like you might expect them
to, and the rest of the application depends on that behaviour.

I'd actually like to implement a reference counted replacement that would
allow us to use scatter gather I/O for relaying packets directly from the
buffer we received them in without any memory copying.

On Fri, Jul 5, 2013 at 7:41 PM, ®om notifications@github.com wrote:

Arf, it breaks tests/routing…

I think there is a problem: shouldn't ob_dup() preserve position on the
destination buffer?


Reply to this email directly or view it on GitHubhttps://github.com/servalproject/serval-dna/pull/66#issuecomment-20510566
.

@rom1v rom1v closed this Jul 20, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment