[freeside-commits] freeside/FS/FS svc_acct.pm,1.190,1.191

Ivan,,, ivan at wavetail.420.am
Tue Feb 7 05:49:46 PST 2006


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv15799

Modified Files:
	svc_acct.pm 
Log Message:
well, it was already fatal.  at least now the error message is better.

Index: svc_acct.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_acct.pm,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -d -r1.190 -r1.191
--- svc_acct.pm	14 Dec 2005 20:57:30 -0000	1.190
+++ svc_acct.pm	7 Feb 2006 13:49:44 -0000	1.191
@@ -1077,7 +1077,10 @@
   my $password = $self->_password;
   my $pw_attrib = length($password) <= 12 ? $radius_password : 'Crypt-Password';  $check{$pw_attrib} = $password;
 
-  my $cust_pkg = $self->cust_svc->cust_pkg;
+  my $cust_svc = $self->cust_svc;
+  die "FATAL: no cust_svc record for svc_acct.svcnum ". $self->svcnum. "\n"
+    unless $cust_svc;
+  my $cust_pkg = $cust_svc->cust_pkg;
   if ( $cust_pkg && $cust_pkg->part_pkg->is_prepaid && $cust_pkg->bill ) {
     $check{'Expiration'} = time2str('%B %e %Y %T', $cust_pkg->bill ); #http://lists.cistron.nl/pipermail/freeradius-users/2005-January/040184.html
   }



More information about the freeside-commits mailing list