|
a/src/mediaserver/contentdirectory.cxx |
|
b/src/mediaserver/contentdirectory.cxx |
|
... |
|
... |
251 |
}
|
251 |
}
|
252 |
|
252 |
|
253 |
|
253 |
|
254 |
void ContentDirectory::Internal::maybeStartSomePlugins(bool enabled)
|
254 |
void ContentDirectory::Internal::maybeStartSomePlugins(bool enabled)
|
255 |
{
|
255 |
{
|
256 |
// If enabled is not set, no service is locally enabled, we are
|
256 |
// If enabled is false, no service is locally enabled, we are
|
257 |
// working for ohcredentials. Explicitely start the microhttpd
|
257 |
// working for ohcredentials. In the previous version, we
|
258 |
// daemon in this case, as we'll need it before any plugin is
|
258 |
// explicitely started the microhttpd daemon in this case (only as
|
259 |
// created.
|
259 |
// we'll need it before any plugin is created.
|
260 |
if (!enabled) {
|
260 |
//
|
|
|
261 |
// The problem was that, if we do have plugins enabled (and not
|
|
|
262 |
// autostarted) but the first access is through OHCredentials, the
|
|
|
263 |
// microhttp server will not be running and the connection from
|
|
|
264 |
// the renderer will fail. Could not find a way to fix this. We'd
|
|
|
265 |
// need to trigger the proxy start from the credentials service
|
|
|
266 |
// (in the other process!) on first access. So just always run the
|
|
|
267 |
// Proxy. Only inconvenient is that it opens one more port.
|
|
|
268 |
// This is rather messy.
|
261 |
PlgWithSlave::maybeStartProxy(this->service);
|
269 |
PlgWithSlave::maybeStartProxy(this->service);
|
262 |
}
|
270 |
|
263 |
for (auto& entry : rootdir) {
|
271 |
for (auto& entry : rootdir) {
|
264 |
string app = appForId(entry.id);
|
272 |
string app = appForId(entry.id);
|
265 |
string sas;
|
273 |
string sas;
|
266 |
if (g_config->get(app + "autostart", sas) && stringToBool(sas)) {
|
274 |
if (g_config->get(app + "autostart", sas) && stringToBool(sas)) {
|
267 |
LOGDEB0("ContentDirectory::Internal::maybeStartSomePlugins: "
|
275 |
LOGDEB0("ContentDirectory::Internal::maybeStartSomePlugins: "
|