Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user operations errors should be properly converted to network byte order #5

Open
rutsky opened this issue Jan 31, 2016 · 1 comment

Comments

@rutsky
Copy link
Contributor

rutsky commented Jan 31, 2016

Currently all errors are set like this:

reply.error = aop->write(chunk, len, from, userdata);

which requires to use ntohl inside user buse_operations.

I suggest to handle byte order on BUSE side, e.g.:

reply.error = htonl(aop->write(chunk, len, from, userdata));
@CaesarJeries
Copy link

I have a question:
Doesn't the order of received byte sent after a write request need to be reversed as well ? If not, why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants