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

Incorrect packet: STATUS_RES_UNIQUE parsing? #18

Open
darnautovic opened this issue Feb 22, 2015 · 1 comment
Open

Incorrect packet: STATUS_RES_UNIQUE parsing? #18

darnautovic opened this issue Feb 22, 2015 · 1 comment

Comments

@darnautovic
Copy link

Hi!
I ran into an issue regarding packet parsing when using "getJobStatus" function.
I found out that I get wrong 'den' value on using "getJobStatus" function.
I also discovered that by changing parse pattern from "ssss8" to "sssss" fixes this issue.
Was there any particular reason to have last data segment in packet parsed as 8-bit unsigned big-endian?

Here is the code snippet of parse call for STATUS_RES packet type. Changing 'ssss8' to 'sssss' gives me correct den value:

 if packet.type is packet_types.STATUS_RES
result = @_parsePacket packet.inputData, 'ssss8'
result = { handle : result[0], known: result[1], running: result[2], percent_done_num: result[3], percent_done_den: result[4] }
@emit 'STATUS_RES', result
return

Thank you :)

@mreinstein
Copy link
Owner

@darnautovic sorry for the reply delay. care to send a pull request?

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