/[smecontribs]/rpms/smeserver-sme9admin/contribs9/smeserver-sme9admin-1.5.bz7683-stop-on-mysql-error.patch
ViewVC logotype

Annotation of /rpms/smeserver-sme9admin/contribs9/smeserver-sme9admin-1.5.bz7683-stop-on-mysql-error.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Tue Sep 10 01:25:21 2019 UTC (5 years, 2 months ago) by jpp
Branch: MAIN
* Mon Sep 09 2019 Jean-Philipe Pialasse <tests@pialasse.com> 1.5-29.sme
- fix sme9admind die on mysql connection error [SME: 7683]

1 jpp 1.1 diff -Nur smeserver-sme9admin-1.5.old/root/usr/bin/sme9admind smeserver-sme9admin-1.5/root/usr/bin/sme9admind
2     --- smeserver-sme9admin-1.5.old/root/usr/bin/sme9admind 2014-12-24 01:41:01.000000000 -0500
3     +++ smeserver-sme9admin-1.5/root/usr/bin/sme9admind 2016-11-23 16:46:55.638000000 -0500
4     @@ -1021,10 +1021,17 @@
5     #rewritten
6     sub execute_sql_query {
7     my ($requete)=(@_);
8     - my $rq=$bd->prepare("$requete");
9     - my $rslt=$rq->execute();
10     - print "RQT MySQL : $requete , Reslt : $rslt/$!\n";
11     - return $rslt;
12     + if (defined ($bd)) {
13     + my $rq=$bd->prepare("$requete") or
14     + warn "MYSQL error $DBI::errstr\n";
15     + my $rslt=$rq->execute() or
16     + warn "MYSQL error $DBI::errstr\n";
17     + print "RQT MySQL : $requete , Reslt : $rslt/$!\n";
18     + return $rslt;
19     + }
20     + else
21     + { print "mysql : no active connection to Mysql"; return 0;}
22     +
23     }
24    
25     sub samba_status {

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed