my $payload_now=""; # text from $payload placed in the current SMS part
while (1) {
if (@udhpositioned && $udhpositioned[0]{TEXT_POSITION} <= $position) { # "<=" should be "=="
- last if USERDATA_LENGTH < length($self->_udh_build(@udhstatic,@udhpositioned_now,$udhpositioned[0]))
- +nail_payload_len($dcs,length($payload_now));
+ if (USERDATA_LENGTH < length($self->_udh_build(@udhstatic,@udhpositioned_now,$udhpositioned[0]))
+ +nail_payload_len($dcs,length($payload_now))) {
+ return "UDH IE (User Data Header Information Element) too long to fit in one SMS fragment"
+ if $payload_now eq "";
+ last;
+ }
my %udhei=%{shift @udhpositioned}; # copy it to local state - we will be modifying it
# we subtract the absolute position base of current SMS part: