From: Scott P. <sp...@gr...> - 2006-07-11 19:40:09
|
Lido, Thanks for pointing this out. I'll see that it gets addressed in the next release. Yesterday I posted monarch-1.2 on SourceForge. It is almost entirely bug fixes so it's worth installing. Also, I plan to address session management in Monarch 2.0. Scott ----- Original Message ----- From: mon...@li... on behalf of Lidio Presutti Sent: Tue, 7/11/2006 12:08pm To: mon...@li... Subject: [Monarch-users] some sub routine logic errors ... Greetings, doing another complete clean install I noticed I was getting a whole bunch entries in my apache log file like: DBD::mysql::st execute failed: Duplicate entry 'default_user_name' for key 1 at /opt/local/nagios/monarch-1.0/lib/MonarchStorProc.pm line 499. DBD::mysql::st execute failed: Duplicate entry 'show_context_help' for key 1 at /opt/local/nagios/monarch-1.0/lib/MonarchStorProc.pm line 499. DBD::mysql::st execute failed: Duplicate entry 'nagios_check_command' for key 1 at /opt/local/nagios/monarch-1.0/lib/MonarchStorProc.pm line 499. .. looking closely at MonarchStorProc.pm near that line number I see routines with this kind of construct: $sth->execute()}; if ($@) { return "Error: $sqlstmt $@"; } else { return 1; } $sth->finish; The last line "$sth->finish" never gets executed due to the "return" in the if-else structures. Although it is not absolutely needed to do the "finish" however it's always best to have "clean" code. The fix is obvious. The same applies to these other subs: sub fetch_list_hash_array(@) { sub fetch_all($) { sub insert_obj(@) { sub insert_obj_id(@) { sub update_obj(@) { sub update_obj_where(@) { sub delete_all(@) { sub delete_one_where(@) { sub insert_dependency() { there maybe others in other modules. Lidio. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Monarch-users mailing list Mon...@li... https://lists.sourceforge.net/lists/listinfo/monarch-users |