Fix errors due to not stopping the dbQueue. Fix crash when querying v4l devices
This commit is contained in:
parent
45bf28a104
commit
a3a592d5e1
|
@ -197,6 +197,7 @@ bool ValidateAccess(User *user, int mon_id, int function) {
|
||||||
|
|
||||||
void exit_zmu(int exit_code) {
|
void exit_zmu(int exit_code) {
|
||||||
logTerm();
|
logTerm();
|
||||||
|
dbQueue.stop();
|
||||||
zmDbClose();
|
zmDbClose();
|
||||||
|
|
||||||
exit(exit_code);
|
exit(exit_code);
|
||||||
|
@ -248,7 +249,7 @@ int main(int argc, char *argv[]) {
|
||||||
{nullptr, 0, nullptr, 0}
|
{nullptr, 0, nullptr, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *device = nullptr;
|
std::string device;
|
||||||
int mon_id = 0;
|
int mon_id = 0;
|
||||||
bool verbose = false;
|
bool verbose = false;
|
||||||
int function = ZMU_BOGUS;
|
int function = ZMU_BOGUS;
|
||||||
|
@ -404,7 +405,7 @@ int main(int argc, char *argv[]) {
|
||||||
Usage();
|
Usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( device && !(function&ZMU_QUERY) ) {
|
if ( !device.empty() && !(function&ZMU_QUERY) ) {
|
||||||
fprintf(stderr, "Error, -d option cannot be used with this option\n");
|
fprintf(stderr, "Error, -d option cannot be used with this option\n");
|
||||||
Usage();
|
Usage();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue