Merge branch 'master' into storageareas
This commit is contained in:
commit
89c9a28614
|
@ -255,11 +255,12 @@ Event::~Event() {
|
||||||
id, frames, end_time.tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec);
|
id, frames, end_time.tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec);
|
||||||
db_mutex.lock();
|
db_mutex.lock();
|
||||||
if ( mysql_query(&dbconn, sql) ) {
|
if ( mysql_query(&dbconn, sql) ) {
|
||||||
|
db_mutex.unlock();
|
||||||
Error("Can't insert frame: %s", mysql_error(&dbconn));
|
Error("Can't insert frame: %s", mysql_error(&dbconn));
|
||||||
} else {
|
} else {
|
||||||
|
db_mutex.unlock();
|
||||||
Debug(1,"Success writing last frame");
|
Debug(1,"Success writing last frame");
|
||||||
}
|
}
|
||||||
db_mutex.unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(sql, sizeof(sql),
|
snprintf(sql, sizeof(sql),
|
||||||
|
@ -271,8 +272,8 @@ Event::~Event() {
|
||||||
video_name, id );
|
video_name, id );
|
||||||
db_mutex.lock();
|
db_mutex.lock();
|
||||||
while ( mysql_query(&dbconn, sql) && !zm_terminate ) {
|
while ( mysql_query(&dbconn, sql) && !zm_terminate ) {
|
||||||
Error("Can't update event: %s reason: %s", sql, mysql_error(&dbconn));
|
|
||||||
db_mutex.unlock();
|
db_mutex.unlock();
|
||||||
|
Error("Can't update event: %s reason: %s", sql, mysql_error(&dbconn));
|
||||||
sleep(1);
|
sleep(1);
|
||||||
db_mutex.lock();
|
db_mutex.lock();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue