You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi ,
Can some one help us to understand why the decode for Address Family is not happening as expected.
We have SMSC-Address , which is of Address Family and of type E164, when we define "Address" in our dictionary and try to Decode this it adds the Type value at the front of the parsed value as this "\x00\b436990071301" instead of "436990071301".
Hi ,
Can some one help us to understand why the decode for Address Family is not happening as expected.
We have SMSC-Address , which is of Address Family and of type E164, when we define "Address" in our dictionary and try to Decode this it adds the Type value at the front of the parsed value as this "\x00\b436990071301" instead of "436990071301".
Example Parsed RAW value:
SMSC-Address {Code:2017,Flags:0xc0,Length:28,VendorId:10415,Value:Address{datatype.Address{0x34, 0x33, 0x36, 0x39, 0x39, 0x30, 0x30, 0x37, 0x31, 0x33, 0x30, 0x31}}, Type{datatype.Address{0x0, 0x8}} Padding:2},
func TestDecodeAddressE164(t *testing.T) {
b := []byte{0x00, 0x08, 0x34, 0x33, 0x36, 0x39, 0x39, 0x30, 0x30, 0x37, 0x31, 0x33, 0x30, 0x31}
address, err := DecodeAddress(b)
if err != nil {
t.Fatal(err)
}
if address.Padding() != 3 {
t.Fatalf("Unexpected padding. Want 3, have %d",
address.Padding())
}
}
Result : --- FAIL: TestDecodeAddressE164 (1.87s)
address_test.go:206: Unexpected padding. Want 3, have 2
FAIL
The text was updated successfully, but these errors were encountered: