e2openplugin-OpenWebif icon indicating copy to clipboard operation
e2openplugin-OpenWebif copied to clipboard

Constant call getAllNetworks() ... why ?

Open ims21 opened this issue 2 years ago • 7 comments

Why is there in Owif called in httpserver.py getAllNetworks() each 15second and always, when is used any item in Owif? F.eg press Edit Bouquet means 5times call, Autotimer cca 4times.

There is then called getAdapterAttribute twice. E2 has there in getAdapterAttribute debug message - then it is displayed in debug log and is difficult anything debuging, when there is list still moved with this messages ... Why it must be checked each 15 seconds and on each controll item ?

ims21 avatar Jan 21 '23 17:01 ims21

getAllNetworks will be called in getChildWithDefault on each request.

You can think about to improve this if you like.

jbleyel avatar Jan 21 '23 18:01 jbleyel

and what about call getAdapterAttribute with 'webif=True' and then there in e2 could be print limited for webif=False only ...

ims21 avatar Jan 21 '23 19:01 ims21

This will only hide the root cause and this is very bad programming style.

jbleyel avatar Jan 21 '23 19:01 jbleyel

By the way. getAllNetworks in getChildWithDefault will be only called if you have disabled the authentication to detect local network.

https://github.com/E2OpenPlugins/e2openplugin-OpenWebif/blob/d9d763b189440a8c885f615cc970e8e3a8c673c7/plugin/httpserver.py#L346-L347

jbleyel avatar Jan 21 '23 20:01 jbleyel

And ? I must enable auth in local network to disable this and then fill it for all boxes on all PCs ?

ims21 avatar Jan 21 '23 22:01 ims21

Yes, everyone should use the password for the user root, and should not operate the boxes without a password in his network, even if it is in the internal network. You don't have set permissions to connect to your pcs and other devices?

Papi2000-new avatar Jan 22 '23 00:01 Papi2000-new

That is for everybody to decide, and not an excuse for bad programming (either here or in E2).

WanWizard avatar Sep 12 '23 15:09 WanWizard