[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1894] trunk/LedgerSMB/Auth/DB.pm



Revision: 1894
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1894&view=rev
Author:   einhverfr
Date:     2007-11-22 19:23:17 -0800 (Thu, 22 Nov 2007)

Log Message:
-----------
Adding more info to an error message

Modified Paths:
--------------
    trunk/LedgerSMB/Auth/DB.pm

Modified: trunk/LedgerSMB/Auth/DB.pm
===================================================================
--- trunk/LedgerSMB/Auth/DB.pm	2007-11-23 01:41:00 UTC (rev 1893)
+++ trunk/LedgerSMB/Auth/DB.pm	2007-11-23 03:23:17 UTC (rev 1894)
@@ -34,13 +34,11 @@
 sub session_check {
     use Time::HiRes qw(gettimeofday);
     my ( $cookie, $form ) = @_;
-    print STDERR "Checking Session\n";
 
     my $path = ($ENV{SCRIPT_NAME});
     $path =~ s|[^/]*$||;
 
    if ($cookie eq 'Login'){
-        print STDERR "creating session\n";
         return session_create($form);
     }
     my $timeout;
@@ -132,7 +130,6 @@
 
 sub session_create {
     my ($lsmb) = @_;
-    print STDERR "Creating Session\n";
     my $path = ($ENV{SCRIPT_NAME});
     $path =~ s|[^/]*$||;
     use Time::HiRes qw(gettimeofday);
@@ -198,7 +195,8 @@
 
     #create a new session
     $createNew->execute( $newSessionID, $login, $newToken, $newTransactionID )
-      || $lsmb->dberror( __FILE__ . ':' . __LINE__ . ': Create new session: ' );
+      || $lsmb->dberror( __FILE__ . ':' . __LINE__ . ": Create new session: \n".
+		$lsmb->{dbh}->errstr() );
 
     #reseed the random number generator
     my $randomSeed = 1.0 * ( '0.' . ( time() ^ ( $$ + ( $$ << 15 ) ) ) );
@@ -210,7 +208,7 @@
 
     my $newCookieValue = $newSessionID . ':' . $newToken . ':' 
 	. $lsmb->{company};
-    print STDERR "Breakpoint\n";
+
     #now set the cookie in the browser
     #TODO set domain from ENV, also set path to install path
     print qq|Set-Cookie: LedgerSMB=$newCookieValue; path=$path;\n|;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.