Skip Menu |

This queue is for tickets about the Net-SMPP CPAN distribution.

Report information
The Basics
Id: 88267
Status: new
Priority: 0/
Queue: Net-SMPP

People
Owner: Nobody in particular
Requestors: jpeacock [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.19
Fixed in: (no value)



Subject: TLV (tag,length,value) values are not numeric
The new version of Net::SMPP (v1.19) mistakenly treat TLV (tag,length,value) values as numeric. Patch it is necessary for our SMPP TLV unit tests to pass.
Subject: Net-SMPP-1.19-TLV.diff
--- SMPP.pm.orig 2013-04-02 19:46:11.748110761 -0400 +++ SMPP.pm 2013-04-02 19:53:32.267088889 -0400 @@ -554,13 +554,7 @@ sub encode_optional_params { if ($param_by_name{$opt_param}) { $data .= pack 'nna*', $param_by_name{$opt_param}, length($val), $val; } elsif ($opt_param =~ /^\d+$/) { # specification by numeric tag - if ($val > -128 && $val < 127) { - $data .= pack 'nnc', $opt_param, 1, $val; - } elsif ($val > -32768 && $val < 32767) { - $data .= pack 'nnn!', $opt_param, 2, $val; - } else { - $data .= pack 'nnN!', $opt_param, 4, $val; - } + $data .= pack 'nna*', $opt_param, length($val), $val; } else { warn "Unknown optional parameter `$opt_param', skipping"; }