|
|
@ -65,10 +65,19 @@ namespace PATCHMAN
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CFileReceiver::init(NLNET::IModule *parent, const std::string &fileSpec)
|
|
|
|
void CFileReceiver::init(NLNET::IModule *parent, const std::string &fileSpec)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
std::vector<std::string> fileSpecs;
|
|
|
|
|
|
|
|
fileSpecs.push_back(fileSpec);
|
|
|
|
|
|
|
|
init(parent, fileSpecs);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CFileReceiver::init(NLNET::IModule *parent, const std::vector<std::string> &fileSpecs)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CFileReceiverSkel::init(parent);
|
|
|
|
CFileReceiverSkel::init(parent);
|
|
|
|
_Parent = parent;
|
|
|
|
_Parent = parent;
|
|
|
|
_FileSpec= fileSpec;
|
|
|
|
_FileSpecs.clear();
|
|
|
|
|
|
|
|
for (std::vector<std::string>::const_iterator it(fileSpecs.begin()), end(fileSpecs.end()); it != end; ++it)
|
|
|
|
|
|
|
|
_FileSpecs.push_back(*it);
|
|
|
|
_AdministeredModuleWrapper.init(dynamic_cast<CAdministeredModuleBase *>(parent));
|
|
|
|
_AdministeredModuleWrapper.init(dynamic_cast<CAdministeredModuleBase *>(parent));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -144,7 +153,8 @@ namespace PATCHMAN
|
|
|
|
if (NLMISC::CSString(module->getModuleManifest()).contains(ManifestEntryIsFileRepository))
|
|
|
|
if (NLMISC::CSString(module->getModuleManifest()).contains(ManifestEntryIsFileRepository))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CFileRepositoryProxy spr(module);
|
|
|
|
CFileRepositoryProxy spr(module);
|
|
|
|
spr.subscribe(_Parent,_FileSpec);
|
|
|
|
for (std::vector<NLMISC::CSString>::const_iterator it(_FileSpecs.begin()), end(_FileSpecs.end()); it != end; ++it)
|
|
|
|
|
|
|
|
spr.subscribe(_Parent, *it);
|
|
|
|
_log("Repository up: "+module->getModuleName());
|
|
|
|
_log("Repository up: "+module->getModuleName());
|
|
|
|
_Proxies[module].Proxy= module;
|
|
|
|
_Proxies[module].Proxy= module;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -281,7 +291,8 @@ namespace PATCHMAN
|
|
|
|
|
|
|
|
|
|
|
|
// send the subscription request
|
|
|
|
// send the subscription request
|
|
|
|
CFileRepositoryProxy spr(sender);
|
|
|
|
CFileRepositoryProxy spr(sender);
|
|
|
|
spr.subscribe(_Parent,_FileSpec);
|
|
|
|
for (std::vector<NLMISC::CSString>::const_iterator it(_FileSpecs.begin()), end(_FileSpecs.end()); it != end; ++it)
|
|
|
|
|
|
|
|
spr.subscribe(_Parent, *it);
|
|
|
|
_log(NLMISC::toString("setupSubscriptions from: %s",sender->getModuleName().c_str()));
|
|
|
|
_log(NLMISC::toString("setupSubscriptions from: %s",sender->getModuleName().c_str()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|