mirror of
https://github.com/akuker/RASCSI.git
synced 2025-02-08 12:30:58 +00:00
Reserved IDs should only have an effect on ATTACH (#298)
* Reserved IDs should only have an effect on ATTACH * Updated evaluation of reserved ID string
This commit is contained in:
parent
80e746b209
commit
b79fd17f6f
@ -490,7 +490,9 @@ string SetReservedIds(const string& ids)
|
||||
stringstream ss(ids);
|
||||
string id;
|
||||
while (getline(ss, id, ',')) {
|
||||
ids_to_reserve.push_back(id);
|
||||
if (!id.empty()) {
|
||||
ids_to_reserve.push_back(id);
|
||||
}
|
||||
}
|
||||
|
||||
set<int> reserved;
|
||||
@ -1110,7 +1112,7 @@ bool ProcessCmd(int fd, const PbDeviceDefinition& pb_device, const PbCommand& co
|
||||
return ReturnStatus(fd, false, error);
|
||||
}
|
||||
|
||||
if (reserved_ids.find(id) != reserved_ids.end()) {
|
||||
if (operation == ATTACH && reserved_ids.find(id) != reserved_ids.end()) {
|
||||
error << "Device ID " << id << " is reserved";
|
||||
return ReturnStatus(fd, false, error);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user