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

TLVs may need to be zero padded #5

Merged
merged 2 commits into from
Apr 4, 2014

Conversation

jerith
Copy link
Member

@jerith jerith commented Apr 4, 2014

Values of TLVs should be length of 2.

>>> from smpp.pdu import encode_optional_parameter
>>> encode_optional_parameter('user_message_reference', 0)
value_hex 00
length_hex 0001
'0204000100'
>>> 

length_hex should be 2 as per the SMPP spec:

Field Size 
octets Type Description
Parameter Tag 2 Integer user_message_reference
Length 2 Integer Length of value part in octets
Value 2 Integer All values allowed.

@smn smn changed the title TLVs need to be zero padded #10 TLVs need to be zero padded Apr 3, 2014
@smn smn changed the title TLVs need to be zero padded TLVs may need to be zero padded Apr 3, 2014
@smn
Copy link
Author

smn commented Apr 4, 2014

skype

@smn
Copy link
Author

smn commented Apr 4, 2014

👍 🍰^🍰

@jerith jerith merged commit 87a8136 into develop Apr 4, 2014
@jerith jerith deleted the feature/issue-5-optional-parameter-length branch April 4, 2014 13:30
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.

2 participants