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

SF.net SVN: ledger-smb:[4169] branches/1.3/LedgerSMB/Form.pm



Revision: 4169
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4169&view=rev
Author:   tshvr
Date:     2011-12-08 20:51:37 +0000 (Thu, 08 Dec 2011)
Log Message:
-----------
handling rc if count session <>0,tracing db connect statements

Modified Paths:
--------------
    branches/1.3/LedgerSMB/Form.pm

Modified: branches/1.3/LedgerSMB/Form.pm
===================================================================
--- branches/1.3/LedgerSMB/Form.pm	2011-12-08 10:58:46 UTC (rev 4168)
+++ branches/1.3/LedgerSMB/Form.pm	2011-12-08 20:51:37 UTC (rev 4169)
@@ -198,9 +198,13 @@
     if (!$ENV{GATEWAY_INTERFACE}){
         return 1;
     }
-    $logger->trace("\$self->{session_id}=$self->{session_id}");
     my $sth = $self->{dbh}->prepare('select form_open(?)');
-    $sth->execute($self->{session_id});
+    my $rc=$sth->execute($self->{session_id});#HV ERROR:Invalid session,if count(*) FROM session!=1,multiple login
+    if(! $rc)
+    {
+     $logger->error("select form_open \$self->{session_id}=$self->{session_id} \$rc=$rc,invalid count FROM session?");
+     return undef;
+    }
     my @results = $sth->fetchrow_array();
 
     $self->{form_id} = $results[0];
@@ -1515,6 +1519,8 @@
         $myconfig->{dbconnect}, $myconfig->{dbuser},
         $myconfig->{dbpasswd}, { AutoCommit => 0 }
     ) or $self->dberror;
+    #HV trying to trace DBI->connect statements
+    $logger->debug("DBI->connect dbh=$dbh");
     $dbh->{pg_enable_utf8} = 1;
 
     # set db options

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