Fixed $cfg->userdata==0 case
authorshort <>
Mon, 29 Apr 2002 18:16:37 +0000 (18:16 +0000)
committershort <>
Mon, 29 Apr 2002 18:16:37 +0000 (18:16 +0000)
 - bugreported by Pavel Machek

GSM/SMS/Transport/Print.pm

index 9ac6b8c..c687c2b 100644 (file)
@@ -23,8 +23,8 @@ my @config_vars = qw(
 sub send       {
        my ($self, $msisdn, $pdu) = @_;
 
-       print "$msisdn:"        if !$self->{"cfg"}{"nomsisdn"};
-       print "$pdu\n",return 0 if !$self->{"cfg"}{"userdata"};
+       print "$msisdn:"                 if !$self->{"cfg"}{"nomsisdn"};
+       do { print "$pdu\n"; return 0; } if !$self->{"cfg"}{"userdata"};
 
        $pdu=pack "H*",$pdu;  #unhex
        $pdu=substr($pdu,0