Added validation check to ensure AccessoryInformation is always the first Service to be defined in an Accessory
Required by HAP (overlooked in original error-checking logic)
This commit is contained in:
parent
69057d560a
commit
a1035bd911
|
|
@ -1167,7 +1167,15 @@ SpanService::SpanService(const char *type, const char *hapName){
|
|||
homeSpan.Accessories.back()->Services.push_back(this);
|
||||
iid=++(homeSpan.Accessories.back()->iidCount);
|
||||
|
||||
homeSpan.configLog+=+"-" + String(iid) + String(" (") + String(type) + String(")\n");
|
||||
homeSpan.configLog+="-" + String(iid) + String(" (") + String(type) + String(") ");
|
||||
|
||||
if(!strcmp(this->type,"3E") && iid!=1){
|
||||
homeSpan.configLog+=" *** ERROR! The AccessoryInformation Service must be defined before any other Services in an Accessory. ***";
|
||||
homeSpan.nFatalErrors++;
|
||||
}
|
||||
|
||||
homeSpan.configLog+="\n";
|
||||
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
|
|
|
|||
Loading…
Reference in New Issue