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

Fix msgrcv #3

Merged
merged 6 commits into from
Dec 11, 2018
Merged

Fix msgrcv #3

merged 6 commits into from
Dec 11, 2018

Conversation

ccussaguet
Copy link

Hi, I modified the msgrcv.go file to use the r1 output which is the length read by the syscall.SYS_MSGRCV. It was working with only string because when I used byte array with 0x00 in it the msgrcv method would stopped before reading the entire message.

@siadat
Copy link
Owner

siadat commented Dec 7, 2018

Hi @ccussaguet, thanks for this PR!

It would be great if you could you add a test in msgrcv_test.go for the failing case you wrote about. This will help prevent us from reverting back to the previous state by mistake.

Also, what do you suggest would be a more descriptive name for the new r1 variable?

Cheers :)

@siadat siadat merged commit 53c7509 into siadat:master Dec 11, 2018
@siadat
Copy link
Owner

siadat commented Dec 11, 2018

Great job! Thanks! 👍

@ccussaguet ccussaguet deleted the fix-msgrcv branch December 14, 2018 07:32
@ccussaguet
Copy link
Author

You're welcome. Now the remaining thing to do is to remove the bufSize const variable (which is too low) and calculate it dynamically using SYS_MSGCTL. I'm working on it but I'm facing a wall for the moment.

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

Successfully merging this pull request may close these issues.

3 participants