praekelt/python-smpp — pull request #5 by jerith (2014-04-04 12:01:57+00:00)
Title: TLVs may need to be zero padded

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.
```