mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-27 16:58:31 -04:00
Switch db_mutex to a std::mutex. Use modern locking with it. Use zmDbDo or dbQueue.push where appropriate. code cleanup.
This commit is contained in:
1 parent
fdf515ca10
commit
8aeb4ab758
9 files changed
+135
-195
No files matched your search
+2
-3
@@ -266,6 +266,7 @@ int main(int argc, char *argv[]) {
|
||||
monitor->Id());
|
||||
zmDbDo(sql);
|
||||
} // end foreach monitor
|
||||
if (zm_terminate) break;
|
||||
|
||||
#if HAVE_RTSP_SERVER
|
||||
RTSPServerThread ** rtsp_server_threads = nullptr;
|
||||
@@ -418,9 +419,7 @@ int main(int argc, char *argv[]) {
|
||||
snprintf(sql, sizeof(sql),
|
||||
"INSERT INTO Monitor_Status (MonitorId,Status) VALUES (%d, 'Connected') ON DUPLICATE KEY UPDATE Status='NotRunning'",
|
||||
monitor->Id());
|
||||
if (mysql_query(&dbconn, sql)) {
|
||||
Error("Can't run query: %s", mysql_error(&dbconn));
|
||||
}
|
||||
zmDbDo(sql);
|
||||
}
|
||||
|
||||
Image::Deinitialise();
|
||||
|
||||
Reference in new issue
Block a user