Commit Graph

47 Commits

Author SHA1 Message Date
Isaac Connor e496679efd Set transaction isolation level to READ COMMITTED so that concurrent event inserts don't deadlock 2021-01-12 14:19:04 -05:00
Isaac Connor 74972be9b5 spacing, code style. Set row=nullptr to quiet valgrind 2020-11-18 13:15:52 -05:00
Peter Keresztes Schmidt 8f980a1168 Convert NULL/0 to nullptr
The 0 -> nullptr changes should definitely improve readability.
2020-08-26 22:03:40 +02:00
Isaac Connor efbab4e2bc Dont' call mysql_library_end as it segfaults and hangs. 2020-05-14 12:00:36 -04:00
Isaac Connor a5ec89ab1b use bool instead of my_bool to fix #2886 2020-03-26 12:07:58 -04:00
Isaac Connor cbf9931371 Don't log about calling dbConnect when already connected. We make this call in zm_logger, it is just going to have to be acceptable to call it multiple times. 2019-09-17 10:29:30 -04:00
Isaac Connor 316dbb5eb8 Implement a RecursiveMutex class which is an explicit Recursive Mutex. Change the db mutex to a recursive Mutex 2018-06-01 11:27:35 -04:00
Isaac Connor bbb10fa4b4 Turn off ffmpeg debugging output, as it seems to conflict with the code at zm_db.cpp 34 2018-04-24 12:40:15 -04:00
Isaac Connor 21413c0fe6 comment out corrupting code 2018-04-24 11:49:10 -04:00
Isaac Connor a110ae71f5 put lines back preventing double open of mysql 2018-04-23 13:48:14 -04:00
Isaac Connor 3a5ff289d0 perfect the whitespace 2018-03-27 10:04:32 -04:00
Isaac Connor 43bdaff0a3 Merge ../ZoneMinder.master into storageareas 2018-03-22 11:32:22 -04:00
Isaac Connor b220b8f588 mostly white space fixes, but also, unlock on error condition 2018-03-22 10:25:47 -04:00
Isaac Connor 06f10e0ed3 fix double free of mysql_result 2018-03-22 10:04:41 -04:00
Isaac Connor a1213142df whitespace 2018-03-09 07:22:59 -05:00
Isaac Connor b3d23ab233 merge zma_to_thread version of db functions, which include a mutex lock 2018-03-01 19:20:29 -08:00
Isaac Connor c04ec1b8a8 fix mem corruption 2017-12-03 12:50:57 -05:00
Isaac Connor 8941bc80b8 reduce log level for success debug message 2017-09-25 16:21:46 -04:00
Isaac Connor 49464d381a Merge branch 'master' into storageareas 2017-08-14 10:44:40 -04:00
ralimi ecb7df0e8b Support SSL for mysql connections (#1965)
* Fix install location for config files when building to alternate directory.

With the previous code, we ended up with a directory structure like the following:

$ find /etc/zm/conf.d/
/etc/zm/conf.d/
/etc/zm/conf.d/01-system-paths.conf
/etc/zm/conf.d/conf.d
/etc/zm/conf.d/conf.d/README
/etc/zm/conf.d/conf.d/02-multiserver.conf

* Omitted README file that should have appeared in /etc/zm/conf.d

* Fix location for configs when building to alternate directory.

* Fix works, but this should go on a branch instead.

* Fix works, but this should go on a branch instead.

* Fix location for configs when building to alternate directory.

With the previous code, we ended up with a directory structure like the following:

$ find /etc/zm/conf.d/
/etc/zm/conf.d/
/etc/zm/conf.d/01-system-paths.conf
/etc/zm/conf.d/conf.d
/etc/zm/conf.d/conf.d/README
/etc/zm/conf.d/conf.d/02-multiserver.conf

* Remove double quotes. This is a list of paths.

* Allow SSL database connection to be secured with SSL.

* Fix incorrect variable name

* Fix PHP syntax errors

* SSL connection parameters must also be passed in API.

* Revert fixes to build files; they should not be in this branch.
2017-08-14 10:30:42 -04:00
Isaac Connor d3ec50aa69 various fixes plus use global db functions in logger 2017-07-06 17:45:23 -04:00
Isaac Connor 5ae34a7561 Merge branch 'master' into storageareas 2017-01-02 09:39:10 -05:00
Andy Bauer 254fcbcef7 update gpl 2 mailing address in source files 2016-12-26 09:23:16 -06:00
Isaac Connor 2451768295 Merge branch 'master' into storageareas 2016-08-08 18:08:46 -04:00
josh4trunks 2ab79820a1 Add back changes 2016-05-22 08:08:12 -07:00
Isaac Connor 819dad455e whitespace/tabs 2016-04-29 09:11:14 -04:00
Isaac Connor 44f32f46b7 deprecate zmdbFetchOne in favor of zmDbRow 2016-04-20 11:56:58 -04:00
Isaac Connor d2870f0692 move the mysql_free_result, looks like we can't free it until we free the row 2016-04-20 09:44:11 -04:00
Isaac Connor 03b1ced568 tabs to spaces and use 2space indenting 2016-04-04 10:11:48 -04:00
Isaac Connor 60410c98d6 use new db functions in zm_config.cpp 2015-07-16 16:44:09 -04:00
Isaac Connor 48fa0c3d42 add some utility db functions 2015-07-16 13:04:28 -04:00
manupap1 b4732e4750 Close logger and database on exit 2014-11-14 22:17:44 +01:00
stan 3aa6c13c64 Added auto reconnect option to database
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3499 e3e1d417-86f3-4887-817a-d78f3d33393f
2011-08-23 13:31:04 +00:00
stan 6ff385e407 git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3459 e3e1d417-86f3-4887-817a-d78f3d33393f 2011-06-21 09:19:10 +00:00
stan e6041e24a7 Uppdated copyright headers
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2611 e3e1d417-86f3-4887-817a-d78f3d33393f
2008-07-25 09:33:23 +00:00
stan f66aa5e10e Updated static config to use strings
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2603 e3e1d417-86f3-4887-817a-d78f3d33393f
2008-07-24 17:08:50 +00:00
stan ee44d4b274 Updated debug format
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2513 e3e1d417-86f3-4887-817a-d78f3d33393f
2008-07-14 14:43:47 +00:00
stan b4032959e0 Bug 406 - Added ability to indicate mysql connection port in host.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2198 e3e1d417-86f3-4887-817a-d78f3d33393f
2007-09-07 15:39:44 +00:00
stan 235dde1a80 Updated copyright statement.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1829 e3e1d417-86f3-4887-817a-d78f3d33393f
2006-01-17 10:56:30 +00:00
stan a35a06dc1d Bug 232 - Revamped build and install
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1678 e3e1d417-86f3-4887-817a-d78f3d33393f
2005-12-16 10:13:59 +00:00
stan 264c23d687 Updated copyright statement
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1360 e3e1d417-86f3-4887-817a-d78f3d33393f
2005-02-24 14:40:14 +00:00
stan 2ba1ee4eb8 Removed secondary DB user.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1171 e3e1d417-86f3-4887-817a-d78f3d33393f
2004-12-28 17:01:25 +00:00
stan 425d5827d3 Changed error messages to use debug library.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@972 e3e1d417-86f3-4887-817a-d78f3d33393f
2004-03-17 10:26:32 +00:00
stan 7b5f23e29a Added zm.h header where missing.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@533 e3e1d417-86f3-4887-817a-d78f3d33393f
2003-05-16 10:27:41 +00:00
stan 79baec3d87 Fixed last fix.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@460 e3e1d417-86f3-4887-817a-d78f3d33393f
2003-04-08 09:51:35 +00:00
stan 882f68067c Changed mysql_connect to mysql_real_connect.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@459 e3e1d417-86f3-4887-817a-d78f3d33393f
2003-04-08 09:50:50 +00:00
stan a6f405b4ac New files created as a result of breaking out the classes to support
the use of remote cameras.


git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@414 e3e1d417-86f3-4887-817a-d78f3d33393f
2003-03-26 12:03:37 +00:00