Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant call getAllNetworks() ... why ? #1596

Open
ims21 opened this issue Jan 21, 2023 · 7 comments
Open

Constant call getAllNetworks() ... why ? #1596

ims21 opened this issue Jan 21, 2023 · 7 comments
Labels
Feature Request 💡 Bring your ideas

Comments

@ims21
Copy link
Contributor

ims21 commented Jan 21, 2023

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 ims21 added the Feature Request 💡 Bring your ideas label Jan 21, 2023
@jbleyel
Copy link
Contributor

jbleyel commented Jan 21, 2023

getAllNetworks will be called in getChildWithDefault on each request.

You can think about to improve this if you like.

@ims21
Copy link
Contributor Author

ims21 commented Jan 21, 2023

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

@jbleyel
Copy link
Contributor

jbleyel commented Jan 21, 2023

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

@jbleyel
Copy link
Contributor

jbleyel commented Jan 21, 2023

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

if (not request.isSecure() and config.OpenWebif.auth.value is False) or (request.isSecure() and config.OpenWebif.https_auth.value is False):
networks = getAllNetworks()

@ims21
Copy link
Contributor Author

ims21 commented Jan 21, 2023

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

@Papi2000-new
Copy link

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?

@WanWizard
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request 💡 Bring your ideas
Projects
None yet
Development

No branches or pull requests

4 participants