[freeside-commits] branch master updated. 404f8f0494ab5fd2ff947bf82d085fed52c126c5

Ivan ivan at 420.am
Sun May 6 10:40:00 PDT 2012


The branch, master has been updated
       via  404f8f0494ab5fd2ff947bf82d085fed52c126c5 (commit)
      from  246670205503b6bcd91130325d2d9050fb7b74e5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 404f8f0494ab5fd2ff947bf82d085fed52c126c5
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun May 6 10:39:59 2012 -0700

    don't abort upgrade if a RADIUS server is unreachable

diff --git a/FS/FS/part_export/sqlradius.pm b/FS/FS/part_export/sqlradius.pm
index 910346b..57bbdb4 100644
--- a/FS/FS/part_export/sqlradius.pm
+++ b/FS/FS/part_export/sqlradius.pm
@@ -1154,8 +1154,13 @@ sub _upgrade_exporttype {
 
 sub import_attrs {
   my $self = shift;
-  my $dbh = sqlradius_connect( map $self->option($_),
+  my $dbh =  DBI->connect( map $self->option($_),
                                    qw( datasrc username password ) );
+  unless ( $dbh ) {
+    warn "Error connecting to RADIUS server: $DBI::errstr\n";
+    return;
+  }
+
   my $usergroup = $self->option('usergroup') || 'usergroup';
   my $error;
   warn "Importing RADIUS groups and attributes from ".$self->option('datasrc').

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/part_export/sqlradius.pm |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list