UI: check if dongle id is valid before calling API (#21275)
old-commit-hash: e85fa7f1c933baafdecb4a52c16f2003215d423b
This commit is contained in:
@@ -155,6 +155,10 @@ std::string dir_name(std::string const &path) {
|
||||
return path.substr(0, pos);
|
||||
}
|
||||
|
||||
bool is_valid_dongle_id(std::string const& dongle_id) {
|
||||
return !dongle_id.empty() && dongle_id != "UnregisteredDevice";
|
||||
}
|
||||
|
||||
struct tm get_time() {
|
||||
time_t rawtime;
|
||||
time(&rawtime);
|
||||
|
||||
Reference in New Issue
Block a user