projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3acaea7
)
show a VoIP Innovations login error in the log, RT#15150
author
ivan
<ivan>
Mon, 13 Feb 2012 05:06:50 +0000
(
05:06
+0000)
committer
ivan
<ivan>
Mon, 13 Feb 2012 05:06:50 +0000
(
05:06
+0000)
FS/FS/part_export/globalpops_voip.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_export/globalpops_voip.pm
b/FS/FS/part_export/globalpops_voip.pm
index
b6e713a
..
52a4ec2
100644
(file)
--- a/
FS/FS/part_export/globalpops_voip.pm
+++ b/
FS/FS/part_export/globalpops_voip.pm
@@
-60,21
+60,23
@@
sub get_dids {
}
my $dids = $self->gp_command('getDIDs', %getdids);
}
my $dids = $self->gp_command('getDIDs', %getdids);
+
if ( $dids->{'type'} eq 'Error' ) {
if ( $dids->{'type'} eq 'Error' ) {
- die "Error running VoIP Innovations getDIDs: ".
- $search->{'statuscode'}. ': '. $search->{'status'}; #die??
+ my $error = "Error running VoIP Innovations getDIDs: ".
+ $dids->{'statuscode'}. ': '. $dids->{'status'}. "\n";
+ warn $error;
+ die $error;
}
}
- #use Data::Dumper;
- #warn Dumper($dids);
-
my $search = $dids->{'search'};
if ( $search->{'statuscode'} == 302200 ) {
return [];
} elsif ( $search->{'statuscode'} != 100 ) {
my $search = $dids->{'search'};
if ( $search->{'statuscode'} == 302200 ) {
return [];
} elsif ( $search->{'statuscode'} != 100 ) {
- die "Error running VoIP Innovations getDIDs: ".
- $search->{'statuscode'}. ': '. $search->{'status'}; #die??
+ my $error = "Error running VoIP Innovations getDIDs: ".
+ $search->{'statuscode'}. ': '. $search->{'status'}. "\n";
+ warn $error;
+ die $error;
}
my @return = ();
}
my @return = ();
@@
-246,7
+248,10
@@
sub gp_command {
my( $self, $command, @args ) = @_;
eval "use Net::GlobalPOPs::MediaServicesAPI;";
my( $self, $command, @args ) = @_;
eval "use Net::GlobalPOPs::MediaServicesAPI;";
- die $@ if $@;
+ if ( $@ ) {
+ warn $@;
+ die $@;
+ }
my $gp = Net::GlobalPOPs::MediaServicesAPI->new(
'login' => $self->option('login'),
my $gp = Net::GlobalPOPs::MediaServicesAPI->new(
'login' => $self->option('login'),