Fixing daemon reload.

This commit is contained in:
stephb9959
2021-09-27 09:44:19 -07:00
parent 3918d677a7
commit f9de771cfa
2 changed files with 20 additions and 8 deletions

View File

@@ -399,6 +399,16 @@ components:
type: integer
hostname:
type: string
certificates:
type: array
items:
type: object
properties:
filename:
type: string
expires:
type: integer
format: int64
ProfileAction:
type: object

View File

@@ -124,8 +124,9 @@ namespace OpenWifi {
auto Hosts=i->HostSize();
for(uint64_t j=0;j<Hosts;++j) {
auto CertFileName = i->Host(j).CertFile();
if(!CertFileName.empty()) {
auto InsertResult = CertNames.insert(CertFileName);
if( InsertResult.second ) {
if(InsertResult.second) {
Poco::JSON::Object Inner;
Inner.set("filename", CertFileName);
Poco::Crypto::X509Certificate C(CertFileName);
@@ -135,6 +136,7 @@ namespace OpenWifi {
}
}
}
}
Answer.set("certificates", Certificates);
ReturnObject(Answer);
return;