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 for PDU's arriving in random order. #10

Merged
merged 2 commits into from
Jun 8, 2016
Merged

Fix for PDU's arriving in random order. #10

merged 2 commits into from
Jun 8, 2016

Conversation

qasimakhan
Copy link
Contributor

Issue: #9

@coveralls
Copy link

coveralls commented Jun 8, 2016

Coverage Status

Coverage remained the same at 70.61% when pulling 1151250 on qasimakhan:master into 8478b16 on larvit:master.

@@ -378,7 +378,7 @@ function longSms(pduObj) {
// 4th octet and length is
// header size -2 octets
partsCount = pduObj.params.short_message[2 + csmsReference.length + 1],
partNr = pduObj.params.short_message[2 + csmsReference.length + 1],
partNr = pduObj.params.short_message[2 + csmsReference.length + 2],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will only work for UDH headers that are 2 in size, right?

Don't we need to use the UDH size instead of hardcoded 2 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have generalized it so it would work for both. So in case scenario from the referred document
would be like following.

  • First "2" is skipping the first 3 octets which remain constant
  • csmsReference.length is the UDH size which we skip
  • then we need to skip total parts count field which is 1 octet and then comes the actual partNr

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, splendid! Thanks. :)

@lillem4n lillem4n merged commit afeb428 into larvit:master Jun 8, 2016
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